Răsfoiți Sursa

TCP is_connected_to_host comparison error

We was returning true when the state was not connected, so we would never return true when the state was connected.
Damian Day 6 ani în urmă
părinte
comite
748c9bc205
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      core/io/stream_peer_tcp.cpp

+ 1 - 1
core/io/stream_peer_tcp.cpp

@@ -253,7 +253,7 @@ bool StreamPeerTCP::is_connected_to_host() const {
 		return false;
 	}
 
-	if (status != STATUS_CONNECTED) {
+	if (status == STATUS_CONNECTED) {
 		return true;
 	}