From df2146ee2412b76f6c0765155f56ee276bfde008 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Tue, 9 Jan 2018 20:08:12 +0100 Subject: [PATCH] sendResolve: improve local socket making error message --- pdns/resolver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/resolver.cc b/pdns/resolver.cc index b8c7d4c5a..dd9b6b3bb 100644 --- a/pdns/resolver.cc +++ b/pdns/resolver.cc @@ -156,15 +156,15 @@ uint16_t Resolver::sendResolve(const ComboAddress& remote, const ComboAddress& l } else { std::string lstr = local.toString(); std::map::iterator lptr; - // see if there is a local + // reuse an existing local socket or make a new one if ((lptr = locals.find(lstr)) != locals.end()) { sock = lptr->second; } else { // try to make socket sock = makeQuerySocket(local, true); if (sock < 0) - throw ResolverException("Unable to create socket to "+remote.toStringWithPort()+": "+stringerror()); + throw ResolverException("Unable to create local socket on "+lstr+" to "+remote.toStringWithPort()+": "+stringerror()); setNonBlocking( sock ); locals[lstr] = sock; } -- 2.40.0