diff --git a/common/thorhelper/thorsoapcall.cpp b/common/thorhelper/thorsoapcall.cpp index 814ba8b26a8..901eb9b9431 100644 --- a/common/thorhelper/thorsoapcall.cpp +++ b/common/thorhelper/thorsoapcall.cpp @@ -2407,6 +2407,9 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo checkTimeLimitExceeded(&remainingMS); Url &connUrl = master->proxyUrlArray.empty() ? url : master->proxyUrlArray.item(0); ep.set(connUrl.host.get(), connUrl.port); + if (ep.isNull()) + throw MakeStringException(-1, "Failed to resolve host '%s'", nullText(connUrl.host.get())); + checkTimeLimitExceeded(&remainingMS); // after ep.set which might make a potentially long getaddrinfo lookup ... if (strieq(url.method, "https")) proto = PersistentProtocol::ProtoTLS;