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: 4.15-20210522-snapshot~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d7bd9b08c9a4c6487293c4d11ade1e297826623;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 c05fa0794a..4aed1a53e0 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2169,7 +2169,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(); }