From: Eduard Bagdasaryan Date: Fri, 13 Aug 2021 16:43:46 +0000 (+0300) Subject: ICAP: do not set connect_timeout on the established connection X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=366c78a;p=thirdparty%2Fsquid.git ICAP: do not set connect_timeout on the established connection Icap::Xaction code should not bother with connect_timeout at all: this work is performed by connection establishing jobs such as ConnOpener and Ssl::IcapPeerConnector. Moreover, the Xaction::noteCommTimedout() handler does not expect disconnected Connection and should not be used while connecting. --- diff --git a/src/adaptation/icap/Xaction.cc b/src/adaptation/icap/Xaction.cc index ce7a4dce06..a8b568afe2 100644 --- a/src/adaptation/icap/Xaction.cc +++ b/src/adaptation/icap/Xaction.cc @@ -294,11 +294,6 @@ Adaptation::Icap::Xaction::useIcapConnection(const Comm::ConnectionPointer &conn connection = conn; service().noteConnectionUse(connection); - typedef CommCbMemFunT TimeoutDialer; - AsyncCall::Pointer timeoutCall = asyncCall(93, 5, "Adaptation::Icap::Xaction::noteCommTimedout", - TimeoutDialer(this,&Adaptation::Icap::Xaction::noteCommTimedout)); - commSetConnTimeout(connection, TheConfig.connect_timeout(service().cfg().bypass), timeoutCall); - typedef CommCbMemFunT CloseDialer; closer = asyncCall(93, 5, "Adaptation::Icap::Xaction::noteCommClosed", CloseDialer(this,&Adaptation::Icap::Xaction::noteCommClosed));