TRQ-1830. Properly interpret the errno obtained in socket_wait_for_write().
Merge branch '4.1-dev' of https://github.com/adaptivecomputing/torque into 4.1-dev