From: Jean-Philippe Menil Date: Tue, 6 Nov 2012 05:01:03 +0000 (-0700) Subject: Bug 3659: read_timeout problem with HTTPS X-Git-Tag: SQUID_3_4_0_1~530 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2677c3b12fad212328cb60d3330d61b967c0feda;p=thirdparty%2Fsquid.git Bug 3659: read_timeout problem with HTTPS --- diff --git a/src/tunnel.cc b/src/tunnel.cc index e1fb9a96e4..670194dfaf 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -327,6 +327,14 @@ TunnelStateData::copy (size_t len, comm_err_t errcode, int xerrno, Connection &f commSetConnTimeout(from.conn, Config.Timeout.read, timeoutCall); } + /* Bump the dest connection read timeout on any activity */ + /* see Bug 3659: tunnels can be weird, with very long one-way transfers */ + if (Comm::IsConnOpen(to.conn)) { + AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "tunnelTimeout", + CommTimeoutCbPtrFun(tunnelTimeout, this)); + commSetConnTimeout(to.conn, Config.Timeout.read, timeoutCall); + } + if (errcode) from.error (xerrno); else if (len == 0 || !Comm::IsConnOpen(to.conn)) {