From 61a2f5c53414eb471103a452a07228962a2d876a Mon Sep 17 00:00:00 2001 From: Yorick de Wid Date: Tue, 16 Apr 2024 10:32:11 +0200 Subject: [PATCH] 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()`. --- core/io/stream_peer_tcp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/io/stream_peer_tcp.cpp b/core/io/stream_peer_tcp.cpp index 2b9487b9e1f..90a8f49a758 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; }