]> 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)
committerAmos Jeffries <yadij@users.noreply.github.com>
Tue, 17 Nov 2020 01:10:07 +0000 (14:10 +1300)
... 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 f8a0bb500112a15cb30f19099df885aec1650580..593a19822f124b4af8ff999bd9b07dfd6ef27cf8 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();
 }