* Do not spin if TCP connection blocks for writing (and add test case).
* Fail queries if TCP dies repeatedly, rather than retrying many times.
* Do not abort in a couple of places if TCP unexpectedly broken.
* Do not spin if TCP connection blocks for writing (and add test case).
* Fail queries if TCP dies repeatedly, rather than retrying many times.
* Do not abort in a couple of places if TCP unexpectedly broken.