diff --git a/lib/client-handshake.c b/lib/client-handshake.c index ebb0dafc..e5c13574 100644 --- a/lib/client-handshake.c +++ b/lib/client-handshake.c @@ -203,8 +203,14 @@ struct libwebsocket *libwebsocket_client_connect_2( if (connect(wsi->sock, v, n) == -1 || LWS_ERRNO == LWS_EISCONN) { - if (LWS_ERRNO == LWS_EALREADY || LWS_ERRNO == LWS_EINPROGRESS - || LWS_ERRNO == LWS_EWOULDBLOCK) { + if (LWS_ERRNO == LWS_EALREADY + || LWS_ERRNO == LWS_EINPROGRESS + || LWS_ERRNO == LWS_EWOULDBLOCK +#ifdef _WIN32 + || LWS_ERRNO == WSAEINVAL +#endif + ) + { lwsl_client("nonblocking connect retry\n"); /*