Permalink
Browse files

if we failed to make a new UDP socket, we'd report a confusing error …

…about it

git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@3153 d19b8d6e-7fed-0310-83ef-9ca221ded41b
  • Loading branch information...
1 parent 23900bd commit 36855b5305d8dce0ffa7c9f1e00ada1c38cadc12 @ahupowerdns ahupowerdns committed Apr 9, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 pdns/pdns_recursor.cc
@@ -324,15 +324,15 @@ class UDPClientSocks
static int makeClientSocket(int family)
{
int ret=(int)socket(family, SOCK_DGRAM, 0);
- Utility::setCloseOnExec(ret);
if(ret < 0 && errno==EMFILE) // this is not a catastrophic error
return ret;
if(ret<0)
- throw AhuException("Making a socket for resolver: "+stringerror());
+ throw AhuException("Making a socket for resolver (family =)"+lexical_cast<string>(family)+"): "+stringerror());
+
+ Utility::setCloseOnExec(ret);
-
int tries=10;
while(--tries) {
uint16_t port;

0 comments on commit 36855b5

Please sign in to comment.