Skip to content

Commit 61a2f5c

Browse files
authored
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()`.
1 parent 4728ff3 commit 61a2f5c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/io/stream_peer_tcp.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Error StreamPeerTCP::poll() {
5151
status = STATUS_ERROR;
5252
return err;
5353
}
54+
return OK;
5455
} else if (status != STATUS_CONNECTING) {
5556
return OK;
5657
}

0 commit comments

Comments
 (0)