mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
Fixed TcpSocket::connect with timeout could switch a blocking socket to non-blocking mode on immediate connection success (#221)
This commit is contained in:
parent
7caf2e64b6
commit
5624948042
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user