diff options
| author | Yorick de Wid <yorickdewid@users.noreply.github.com> | 2024-04-16 10:32:11 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-16 10:32:11 +0200 |
| commit | 61a2f5c53414eb471103a452a07228962a2d876a (patch) | |
| tree | fa650d04d3c8c95f8169a21986209c54bddeaebf | |
| parent | 4728ff30c0226b9918b29a6ba494dc61eae87639 (diff) | |
| download | redot-engine-61a2f5c53414eb471103a452a07228962a2d876a.tar.gz | |
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()`.
| -rw-r--r-- | core/io/stream_peer_tcp.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp index 2b9487b9e1..90a8f49a75 100644 --- a/core/io/stream_peer_tcp.cpp +++ b/core/io/stream_peer_tcp.cpp @@ -51,6 +51,7 @@ Error StreamPeerTCP::poll() { status = STATUS_ERROR; return err; } + return OK; } else if (status != STATUS_CONNECTING) { return OK; } |
