From: Remi Gacogne Date: Mon, 19 Sep 2022 13:20:37 +0000 (+0200) Subject: dnsdist: In single acceptor mode, make the TCP accept socket non-blocking X-Git-Tag: dnsdist-1.8.0-rc1~287^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b20ac9890bd44938a88479b63d4e2c75447e7fc4;p=thirdparty%2Fpdns.git dnsdist: In single acceptor mode, make the TCP accept socket non-blocking In theory we should only be waken up if there is a connection to accept, but let's make sure we don't block if there ever is a spurious wake-up event. --- diff --git a/pdns/dnsdist-tcp.cc b/pdns/dnsdist-tcp.cc index 2ac8bf88c8..c9f4120b77 100644 --- a/pdns/dnsdist-tcp.cc +++ b/pdns/dnsdist-tcp.cc @@ -1305,6 +1305,7 @@ static void tcpClientThread(int pipefd, int crossProtocolQueriesPipeFD, int cros for (size_t idx = 0; idx < acceptParams.size(); idx++) { const auto& param = acceptParams.at(idx); + setNonBlocking(param.socket); data.mplexer->addReadFD(param.socket, acceptCallback, ¶m); }