Skip to content

Commit

Permalink
FIX: Return if TCP is in STATUS_CONNECTED
Browse files Browse the repository at this point in the history
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()`.
  • Loading branch information
yorickdewid authored Apr 16, 2024
1 parent 4728ff3 commit 61a2f5c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/io/stream_peer_tcp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Error StreamPeerTCP::poll() {
status = STATUS_ERROR;
return err;
}
return OK;
} else if (status != STATUS_CONNECTING) {
return OK;
}
Expand Down

0 comments on commit 61a2f5c

Please sign in to comment.