1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #59582 from Faless/net/4.x_tcp_explicit_poll

This commit is contained in:
Rémi Verschelde
2022-04-27 13:56:58 +02:00
committed by GitHub
10 changed files with 51 additions and 75 deletions

View File

@@ -273,6 +273,7 @@ void WSLClient::poll() {
return; // Not connected.
}
_tcp->poll();
switch (_tcp->get_status()) {
case StreamPeerTCP::STATUS_NONE:
// Clean close
@@ -336,7 +337,7 @@ MultiplayerPeer::ConnectionStatus WSLClient::get_connection_status() const {
return CONNECTION_CONNECTED;
}
if (_tcp->is_connected_to_host() || _resolver_id != IP::RESOLVER_INVALID_ID) {
if (_tcp->get_status() == StreamPeerTCP::STATUS_CONNECTING || _resolver_id != IP::RESOLVER_INVALID_ID) {
return CONNECTION_CONNECTING;
}