* fhandler_socket.cc (fhandler_socket::connect): Don't change state

on WSAEALREADY error.  Change comment accordingly.
This commit is contained in:
Corinna Vinschen 2014-10-14 19:43:09 +00:00
parent 1dd75c50d5
commit 50e4b6d557
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2014-10-14 Corinna Vinschen <corinna@vinschen.de>
* fhandler_socket.cc (fhandler_socket::connect): Don't change state
on WSAEALREADY error. Change comment accordingly.
2014-10-14 Corinna Vinschen <corinna@vinschen.de>
* cygheap.cc (init_cygheap::init_installation_root): Install Cygwin's

View File

@ -1201,8 +1201,9 @@ fhandler_socket::connect (const struct sockaddr *name, int namelen)
Convert to POSIX/Linux compliant EISCONN. */
else if (err == WSAEINVAL && connect_state () == listener)
WSASetLastError (WSAEISCONN);
/* Any other error means the connmect failed. */
else if (connect_state () == connect_pending)
/* Any other error except WSAEALREADY during connect_pending means the
connect failed. */
else if (connect_state () == connect_pending && err != WSAEALREADY)
connect_state (connect_failed);
set_winsock_errno ();
}