per bbangert's r

* Make the client get as atomic as possible.
* the defer catches and logs socket errors, including blocked channels.
Merge pull request #1 from jrconlin/dev

per bbangert's r