Fix a bug in safe_read() that would cause short reads on an async socket to return failure rather than the number of characters read.
Fix a bug in safe_read() that would cause short reads on an async socket
to return failure rather than the number of characters read.

niklata/ndhc