]> git.ipfire.org Git - thirdparty/pdns.git/blobdiff - pdns/iputils.cc
when we sendmsg, the socket may not be done connecting yet
[thirdparty/pdns.git] / 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) {