From: Otto Moerbeek Date: Wed, 1 Jul 2020 10:57:24 +0000 (+0200) Subject: Common TCP write problems should only be logged if wanted. X-Git-Tag: dnsdist-1.5.0-rc4^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03d6a0c83c56f26a01a873770e2779a2f9f91455;p=thirdparty%2Fpdns.git Common TCP write problems should only be logged if wanted. --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index a644bc57ef..73bcc4f719 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -1837,16 +1837,16 @@ static void startDoResolve(void *p) int wret=Utility::writev(dc->d_socket, iov, 2); bool hadError=true; - if(wret == 0) - g_log<getRemote()<getRemote()<getRemote() << ": " << strerror(err) << endl; - } else if((unsigned int)wret != 2 + packet.size()) - g_log<getRemote()<<" for "<d_mdp.d_qname<<" (size="<< (2 + packet.size()) <<", sent "<getRemote() << ": " << strerror(err) << endl; + } else if ((unsigned int)wret != 2 + packet.size()) { + g_log<getRemote()<<" for "<d_mdp.d_qname<<" (size="<< (2 + packet.size()) <<", sent "<d_tcpConnection->d_requestsInFlight > 0) { dc->d_tcpConnection->d_requestsInFlight--;