From 2ee280cfa4d6aaed243d0f994b201c9ac75925f0 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 26 Nov 2015 15:23:57 +0100 Subject: [PATCH] EMFILE was (out of filedescriptors, too many open files) was reported as an error that could be blamed on the remote nameserver instead of on the OS, causing throttle actions. --- pdns/pdns_recursor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 886a959cc..4538e398d 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -353,12 +353,12 @@ public: typedef set 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; -- 2.40.0