From: Alex Rousskov Date: Tue, 10 Nov 2020 21:42:18 +0000 (+0000) Subject: Transactions exceeding client_lifetime are logged as _ABORTED (#748) X-Git-Tag: SQUID_4_14~3 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=423f78354f148d182a0e3452aed4cfbcd422177b;p=thirdparty%2Fsquid.git Transactions exceeding client_lifetime are logged as _ABORTED (#748) ... rather than timed out (_TIMEOUT). To record the right cause of death, we have to call terminateAll() rather than setting logType.err.timedout directly. Otherwise, when ConnStateData::swanSong() calls terminateAll(0), it overwrites our direct setting. --- diff --git a/src/client_side.cc b/src/client_side.cc index 547b0ca723..941a31d8bb 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2347,7 +2347,8 @@ clientLifetimeTimeout(const CommTimeoutCbParams &io) ClientHttpRequest *http = static_cast(io.data); debugs(33, DBG_IMPORTANT, "WARNING: Closing client connection due to lifetime timeout"); debugs(33, DBG_IMPORTANT, "\t" << http->uri); - http->logType.err.timedout = true; + if (const auto conn = http->getConn()) + conn->pipeline.terminateAll(ETIMEDOUT); if (Comm::IsConnOpen(io.conn)) io.conn->close(); }