]> granicus.if.org Git - pdns/commitdiff
EMFILE was (out of filedescriptors, too many open files) was reported as an error...
authorbert hubert <bert.hubert@netherlabs.nl>
Thu, 26 Nov 2015 14:23:57 +0000 (15:23 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Thu, 26 Nov 2015 16:06:07 +0000 (17:06 +0100)
pdns/pdns_recursor.cc

index 886a959cc48d4061be5a9f1bd5489ff1d3dbcdc4..4538e398d0c2c63ba9f4e23adc29c6af6c0bb1a3 100644 (file)
@@ -353,12 +353,12 @@ public:
   typedef set<int> socks_t;
   socks_t d_socks;
 
-  // returning -1 means: temporary OS error (ie, out of files), -2 means OS error
+  // returning -2 means: temporary OS error (ie, out of files), -1 means error related to remote
   int getSocket(const ComboAddress& toaddr, int* fd)
   {
     *fd=makeClientSocket(toaddr.sin4.sin_family);
     if(*fd < 0) // temporary error - receive exception otherwise
-      return -1;
+      return -2;
 
     if(connect(*fd, (struct sockaddr*)(&toaddr), toaddr.getSocklen()) < 0) {
       int err = errno;