Clarify an if statement in NetPlayClient.cpp. See: https://github.com/LaurentGomila/SFML/issues/26.
This was simply an error in documentation. It actually returns an sf::Socket::Status enum value as a result.
This commit is contained in:
parent
079b1ba93d
commit
f5408c3f52
|
@ -67,8 +67,7 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
|
|||
|
||||
is_connected = false;
|
||||
|
||||
// why is false successful? documentation says true is
|
||||
if (0 == m_socket.Connect(port, address, 5))
|
||||
if (m_socket.Connect(port, address, 5) == sf::Socket::Done)
|
||||
{
|
||||
// send connect message
|
||||
sf::Packet spac;
|
||||
|
@ -126,8 +125,9 @@ NetPlayClient::NetPlayClient(const std::string& address, const u16 port, NetPlay
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlertT("Failed to Connect!");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// called from ---NETPLAY--- thread
|
||||
|
|
Loading…
Reference in New Issue