X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2Fsg_netChannel.cxx;h=a189f6816af6de09e6b8a1af07315fc0b4a2f947;hb=bc9b3f6ff1fcc5caa67c07ad99f971c0faacf91a;hp=86839e71a707384661f9a5555cdd1f7d38e3e0d2;hpb=427d6c3316e59aa86bbf4d3e51f522e0aba9c4fd;p=simgear.git diff --git a/simgear/io/sg_netChannel.cxx b/simgear/io/sg_netChannel.cxx index 86839e71..a189f681 100644 --- a/simgear/io/sg_netChannel.cxx +++ b/simgear/io/sg_netChannel.cxx @@ -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 ) ;