From 76b67fcd1cde69f3d8d652f7660dc752232de104 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Mon, 17 Jun 2013 23:12:44 +0200 Subject: [PATCH] Fixed non-blocking connection with a sf::TcpSocket on Windows --- src/SFML/Network/Win32/SocketImpl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SFML/Network/Win32/SocketImpl.cpp b/src/SFML/Network/Win32/SocketImpl.cpp index 448b747da..a3c26b75f 100644 --- a/src/SFML/Network/Win32/SocketImpl.cpp +++ b/src/SFML/Network/Win32/SocketImpl.cpp @@ -74,11 +74,13 @@ Socket::Status SocketImpl::getErrorStatus() switch (WSAGetLastError()) { case WSAEWOULDBLOCK : return Socket::NotReady; + case WSAEALREADY : return Socket::NotReady; case WSAECONNABORTED : return Socket::Disconnected; case WSAECONNRESET : return Socket::Disconnected; case WSAETIMEDOUT : return Socket::Disconnected; case WSAENETRESET : return Socket::Disconnected; case WSAENOTCONN : return Socket::Disconnected; + case WSAEISCONN : return Socket::Done; // when connecting a non-blocking socket default : return Socket::Error; } }