Instead of EINPROGRESS WinSock2 returns WSAEWOULDBLOCK if a non-blocking
connect(2) cannot be completed immediately.
Signed-off-by: Heiko Hund <heiko.hund@sophos.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id:
1342541993-32462-1-git-send-email-heiko.hund@sophos.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6875
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
status = connect (sd, &remote->addr.sa, af_addr_size(remote->addr.sa.sa_family));
if (status)
status = openvpn_errno_socket ();
- if (status == EINPROGRESS)
+ if (
+#ifdef WIN32
+ status == WSAEWOULDBLOCK
+#else
+ status == EINPROGRESS
+#endif
+ )
{
while (true)
{