Handle no useful address types from getaddrinfo()
diff --git a/common/network/TcpSocket.cxx b/common/network/TcpSocket.cxx
index 5158e80..ef7f55d 100644
--- a/common/network/TcpSocket.cxx
+++ b/common/network/TcpSocket.cxx
@@ -234,6 +234,9 @@
   }
 
   freeaddrinfo(ai);
+
+  if (current == NULL)
+    throw Exception("No useful address for host");
 #endif /* HAVE_GETADDRINFO */
 
   if (result == -1)