2
0
Эх сурвалжийг харах

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()`.
Yorick de Wid 1 жил өмнө
parent
commit
61a2f5c534

+ 1 - 0
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;
 	}