From: Otto Date: Mon, 15 Mar 2021 11:08:54 +0000 (+0100) Subject: change in writenWithTimeout should not be needed anymore as sdig now X-Git-Tag: rec-4.5.0-beta1^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0c48196e2bcc767ae40e2d6161aa76af538d0e1;p=thirdparty%2Fpdns.git change in writenWithTimeout should not be needed anymore as sdig now uses tcpiohandler with blocking sockets --- diff --git a/pdns/sstuff.hh b/pdns/sstuff.hh index ced296ed6e..c253046521 100644 --- a/pdns/sstuff.hh +++ b/pdns/sstuff.hh @@ -279,9 +279,7 @@ public: while(bytes) { ret=::write(d_socket, ptr, bytes); if(ret < 0) { - // some systems (e.g. OpenBSD) return ENOTCONN on non-blocking sockets on which connect *has been* called - // we have to wait for the opportunity to write after the connect is done - if (errno == EAGAIN || errno == ENOTCONN) { + if(errno == EAGAIN) { ret=waitForRWData(d_socket, false, timeout, 0); if(ret < 0) throw NetworkError("Waiting for data write");