]> 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>
Mon, 23 Nov 2020 09:44:04 +0000 (22:44 +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 547b0ca72321f99f75ffb74cef693d0f1ce45c85..941a31d8bbc745c09f35e256816708e02d4fd29e 100644 (file)
@@ -2347,7 +2347,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();
 }