You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
[WebSocket] Fix TCP connection being closed while connecting.
Fix a bug causing the WebSocketPeer to fail connecting to a remote server when the TCP 3-way handshake took more than a few milliseconds.
This commit is contained in:
@@ -104,6 +104,8 @@ void WSLPeer::Resolver::try_next_candidate(Ref<StreamPeerTCP> &p_tcp) {
|
|||||||
p_tcp->set_no_delay(true);
|
p_tcp->set_no_delay(true);
|
||||||
ip_candidates.clear();
|
ip_candidates.clear();
|
||||||
return;
|
return;
|
||||||
|
} else if (status == StreamPeerTCP::STATUS_CONNECTING) {
|
||||||
|
return; // Keep connecting.
|
||||||
} else {
|
} else {
|
||||||
p_tcp->disconnect_from_host();
|
p_tcp->disconnect_from_host();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user