]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
ICAP: do not set connect_timeout on the established connection
authorEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Fri, 13 Aug 2021 16:43:46 +0000 (19:43 +0300)
committerEduard Bagdasaryan <eduard.bagdasaryan@measurement-factory.com>
Fri, 13 Aug 2021 16:43:46 +0000 (19:43 +0300)
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.

src/adaptation/icap/Xaction.cc

index ce7a4dce069b015df6fe5968b11dd9404f173052..a8b568afe286f9cdcc21005391578a6c0f283615 100644 (file)
@@ -294,11 +294,6 @@ Adaptation::Icap::Xaction::useIcapConnection(const Comm::ConnectionPointer &conn
     connection = conn;
     service().noteConnectionUse(connection);
 
-    typedef CommCbMemFunT<Adaptation::Icap::Xaction, CommTimeoutCbParams> 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<Adaptation::Icap::Xaction, CommCloseCbParams> CloseDialer;
     closer =  asyncCall(93, 5, "Adaptation::Icap::Xaction::noteCommClosed",
                         CloseDialer(this,&Adaptation::Icap::Xaction::noteCommClosed));