TRQ-1830. Properly interpret the errno obtained in socket_wait_for_write().
Merge branch '4.2-dev' of https://github.com/adaptivecomputing/torque into 4.2-dev
Fix a problem with my fix for TRQ-1830. The socket should only be overwritten in the case of a permanent failure.