]> git.mxchange.org Git - simgear.git/blobdiff - simgear/io/sg_netChannel.cxx
Unit test for SGBinObj, and fix a bug in large-indice handling the test revealed.
[simgear.git] / simgear / io / sg_netChannel.cxx
index 86839e71a707384661f9a5555cdd1f7d38e3e0d2..a189f6816af6de09e6b8a1af07315fc0b4a2f947 100644 (file)
@@ -209,6 +209,13 @@ NetChannel::handleResolve()
         return 0; // not looked up yet, wait longer
     }
     
+    if (!addr.isValid()) {
+        SG_LOG(SG_IO, SG_WARN, "Network: host lookup failed:" << host);
+        handleError (0);
+        close();
+        return -1;
+    }
+    
     resolving_host = false;
     addr.setPort(port);
     int result = Socket::connect ( &addr ) ;