Check for writability when waiting for a socket to finish connecting.