1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

FIX: Return if TCP is in STATUS_CONNECTED

If the `StreamPeerTCP` is polled and the TCP connection is `STATUS_CONNECTED` it should return after polling netsocket. Without `return` poll keeps calling `_sock->connect_to_host` and `connect()`.

(cherry picked from commit 61a2f5c534)
This commit is contained in:
Yorick de Wid
2024-04-16 10:32:11 +02:00
committed by Rémi Verschelde
parent bb5ea0d249
commit 943b394946
2 changed files with 5 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ Error StreamPeerTCP::poll() {
status = STATUS_ERROR;
return err;
}
return OK;
} else if (status != STATUS_CONNECTING) {
return OK;
}