From: Otto Date: Wed, 20 Jan 2021 12:28:02 +0000 (+0100) Subject: Use a timeout with tcp connect to we get the EINPROGRESS handling. X-Git-Tag: rec-4.5.0-beta1^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5496f4261e23125ec7dde40f923f9494e8ed596;p=thirdparty%2Fpdns.git Use a timeout with tcp connect to we get the EINPROGRESS handling. --- diff --git a/pdns/lwres.cc b/pdns/lwres.cc index 96f353b487..465699b478 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -334,7 +334,7 @@ LWResult::Result asyncresolve(const ComboAddress& ip, const DNSName& domain, int s.bind(local); - s.connect(ip); + s.connect(ip, g_networkTimeoutMsec * 1000); // needed for fastopen EINPROGRESS and better anyway than the system wide connect timeout uint16_t tlen=htons(vpacket.size()); char *lenP=(char*)&tlen;