]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
change in writenWithTimeout should not be needed anymore as sdig now
authorOtto <otto.moerbeek@open-xchange.com>
Mon, 15 Mar 2021 11:08:54 +0000 (12:08 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Wed, 24 Mar 2021 10:14:24 +0000 (11:14 +0100)
uses tcpiohandler with blocking sockets

pdns/sstuff.hh

index ced296ed6e2c35c1d681451adcef0ac3ab3f3a64..c25304652186e38ea0b8e414de0ebc0c0f4112ac 100644 (file)
@@ -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");