Avoid clobbering network error message

If an error message is already set, don't reset
it in socket error handler. If we have an error
message already, it is most likely more specific
than the generic socket error.

Issue #145