From 2677c3b12fad212328cb60d3330d61b967c0feda Mon Sep 17 00:00:00 2001 From: Jean-Philippe Menil Date: Mon, 5 Nov 2012 22:01:03 -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 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)) { -- 2.47.3