From: Peter van Dijk Date: Mon, 8 Apr 2019 12:05:53 +0000 (+0200) Subject: when we sendmsg, the socket may not be done connecting yet X-Git-Tag: dnsdist-1.4.0-alpha1~13^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2bd6a088aaa532656e98f4ce43628852fce6db6d;p=thirdparty%2Fpdns.git when we sendmsg, the socket may not be done connecting yet --- diff --git a/pdns/iputils.cc b/pdns/iputils.cc index 88fd698131..b7cad40319 100644 --- a/pdns/iputils.cc +++ b/pdns/iputils.cc @@ -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) {