]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
when we sendmsg, the socket may not be done connecting yet
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 8 Apr 2019 12:05:53 +0000 (14:05 +0200)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 8 Apr 2019 12:05:53 +0000 (14:05 +0200)
pdns/iputils.cc

index 88fd698131b2d0aaeeda4442f4a11c4763122527..b7cad40319320f301d95b869d736ef5a1e383f68 100644 (file)
@@ -340,7 +340,7 @@ size_t sendMsgWithTimeout(int fd, const char* buffer, size_t len, int idleTimeou
       if (errno == EINTR) {
         continue;
       }
-      else if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINPROGRESS) {
+      else if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINPROGRESS || errno == ENOTCONN) {
         /* EINPROGRESS might happen with non blocking socket,
            especially with TCP Fast Open */
         if (totalTimeout <= 0 && idleTimeout <= 0) {