What does Windows error code 10037 (WSAEALREADY) mean?

 
Previous Next
WSAEINPROGRESS WSAENOTSOCK

WSAEALREADY

WSAEALREADY means that a nonblocking connect is already in progress on this socket. A second connect call does not test whether the first attempt has finished.

Wait for completion readiness and obtain the pending connect result instead of calling connect again on the same nonblocking socket. If a new destination is required, close or reset the socket according to the application’s connection state machine.

Correct completion model

Register for connection completion before or when starting the operation. For example, select can report the socket as writable, while WSAAsyncSelect and WSAEventSelect report an FD_CONNECT notification with the outcome.

Do not poll with connect

Winsock documents compatibility differences between implementations for repeated calls while a connection is pending. Store a connecting state and wait for the completion event instead.

Microsoft: connect


Looking for a different code? Search another status or error code.