Connection timeout handling.
Emit 'error' event on net error.