From 3314ccaeb0d845eff47ce2f299085334c1de970b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Menil Date: Fri, 9 Nov 2012 21:39:36 -0700 Subject: [PATCH] Bug 3659: read_timeout problem with HTTPS --- src/tunnel.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/tunnel.cc b/src/tunnel.cc index c0c688a289..aa82ebee50 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -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)) { -- 2.47.2