]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 3659: read_timeout problem with HTTPS
authorJean-Philippe Menil <jean-philippe.menil@univ-nantes.fr>
Sat, 10 Nov 2012 04:39:36 +0000 (21:39 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 10 Nov 2012 04:39:36 +0000 (21:39 -0700)
src/tunnel.cc

index c0c688a28970310466ae579dca393d53d5cfd680..aa82ebee50337997d6cb0aa3fd681caf52647382 100644 (file)
@@ -318,6 +318,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)) {