X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fio%2Fsg_netChannel.cxx;h=b903a98082f4c31d6f853c168140c1d98f985dfa;hb=201cb61f842ef50a19438e3872ba22e588fa1afc;hp=86839e71a707384661f9a5555cdd1f7d38e3e0d2;hpb=1cb9a79fd48ce6151f6a2cf8d07ef23e002a81b1;p=simgear.git diff --git a/simgear/io/sg_netChannel.cxx b/simgear/io/sg_netChannel.cxx index 86839e71..b903a980 100644 --- a/simgear/io/sg_netChannel.cxx +++ b/simgear/io/sg_netChannel.cxx @@ -16,7 +16,7 @@ You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA For further information visit http://plib.sourceforge.net @@ -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 ) ;