mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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()`.
This commit is contained in:
parent
4728ff30c0
commit
61a2f5c534
1 changed files with 1 additions and 0 deletions
|
@ -51,6 +51,7 @@ Error StreamPeerTCP::poll() {
|
||||||
status = STATUS_ERROR;
|
status = STATUS_ERROR;
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
return OK;
|
||||||
} else if (status != STATUS_CONNECTING) {
|
} else if (status != STATUS_CONNECTING) {
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue