Under Linux (probably POSIX), the current code tests for timeout, but
does not test for connection failure. connectAsync() returns succesfully
upon an EINPROGRESS result; but at this point, the connection state is
still unknown. After selectWrite() is done, we need to test the socket
for errors again.