From 56249480422aba9e2f6d1caaa563fc9cde204223 Mon Sep 17 00:00:00 2001 From: Laurent Gomila Date: Fri, 9 Aug 2013 16:13:58 +0200 Subject: [PATCH] Fixed TcpSocket::connect with timeout could switch a blocking socket to non-blocking mode on immediate connection success (#221) --- src/SFML/Network/TcpSocket.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SFML/Network/TcpSocket.cpp b/src/SFML/Network/TcpSocket.cpp index c7eb6ec8b..e93a552c7 100644 --- a/src/SFML/Network/TcpSocket.cpp +++ b/src/SFML/Network/TcpSocket.cpp @@ -150,6 +150,7 @@ Socket::Status TcpSocket::connect(const IpAddress& remoteAddress, unsigned short if (::connect(getHandle(), reinterpret_cast(&address), sizeof(address)) >= 0) { // We got instantly connected! (it may no happen a lot...) + setBlocking(blocking); return Done; }