Merge pull request #67345 from Faless/ws/4.x_fix_connecting

[WebSocket] Fix TCP connection being closed while connecting.
This commit is contained in:
Fabio Alessandrelli 2022-10-13 15:20:22 +02:00 committed by GitHub
commit 29fc755f5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,6 +104,8 @@ void WSLPeer::Resolver::try_next_candidate(Ref<StreamPeerTCP> &p_tcp) {
p_tcp->set_no_delay(true);
ip_candidates.clear();
return;
} else if (status == StreamPeerTCP::STATUS_CONNECTING) {
return; // Keep connecting.
} else {
p_tcp->disconnect_from_host();
}