Fixed TcpSocket::connect with timeout could switch a blocking socket to non-blocking mode on immediate connection success (#221)

This commit is contained in:
Laurent Gomila 2013-08-09 16:13:58 +02:00
parent 7caf2e64b6
commit 5624948042

View File

@ -150,6 +150,7 @@ Socket::Status TcpSocket::connect(const IpAddress& remoteAddress, unsigned short
if (::connect(getHandle(), reinterpret_cast<sockaddr*>(&address), sizeof(address)) >= 0)
{
// We got instantly connected! (it may no happen a lot...)
setBlocking(blocking);
return Done;
}