mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
fix identification of failed TCP connection
This commit is contained in:
parent
3d89cef544
commit
921e6946c9
@ -234,6 +234,14 @@ open_TCP_client_connection(const NetAddress &address, int timeout_ms) {
|
||||
}
|
||||
}
|
||||
|
||||
if (okflag) {
|
||||
// So, the connect() operation finished, but did it succeed or fail?
|
||||
if (socket->GetPeerName().GetIPAddressRaw() == 0) {
|
||||
// No peer means it failed.
|
||||
okflag = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!okflag) {
|
||||
net_cat.error()
|
||||
<< "Unable to open TCP connection to server "
|
||||
|
Loading…
x
Reference in New Issue
Block a user