]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Transactions exceeding client_lifetime are logged as _ABORTED (#748)
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 10 Nov 2020 21:42:18 +0000 (21:42 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 10 Nov 2020 22:31:54 +0000 (22:31 +0000)
... 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.

src/client_side.cc

index c05fa0794a639729ee2c90177e302b56d95fb215..4aed1a53e00d197d4e615bdd40ef38fdaa829b60 100644 (file)
@@ -2169,7 +2169,8 @@ clientLifetimeTimeout(const CommTimeoutCbParams &io)
     ClientHttpRequest *http = static_cast<ClientHttpRequest *>(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();
 }