You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Properly handle tcp connection failure
(cherry picked from commit 4f07b595a1)
This commit is contained in:
@@ -107,7 +107,12 @@ Error StreamPeerTCPPosix::_poll_connection(bool p_block) const {
|
|||||||
return OK;
|
return OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
return OK;
|
if (errno == EINPROGRESS || errno == EALREADY) {
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = STATUS_ERROR;
|
||||||
|
return ERR_CONNECTION_ERROR;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
status = STATUS_CONNECTED;
|
status = STATUS_CONNECTED;
|
||||||
|
|||||||
@@ -98,7 +98,12 @@ Error StreamPeerWinsock::_poll_connection(bool p_block) const {
|
|||||||
return OK;
|
return OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
return OK;
|
if (errno == WSAEINPROGRESS || errno == WSAEALREADY) {
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = STATUS_ERROR;
|
||||||
|
return ERR_CONNECTION_ERROR;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
status = STATUS_CONNECTED;
|
status = STATUS_CONNECTED;
|
||||||
|
|||||||
Reference in New Issue
Block a user