This change makes the client attempt to reconnect when a write fails. We already had reconnect support, but the reconnect would previously happen on the next call after an error. Being more eager leads to a smoother experience overall.