]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Squid-to-client write_timeout triggers client_lifetime timeout (#747)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sun, 8 Nov 2020 17:50:03 +0000 (17:50 +0000)
committerAmos Jeffries <yadij@users.noreply.github.com>
Sun, 4 Apr 2021 05:16:24 +0000 (17:16 +1200)
Since commit 5ef5e5c, a socket write timeout triggers two things:
* reporting of a write error to the socket writer (as designed/expected)
* reporting of a socket read timeout to the socket reader (unexpected).

The exact outcome probably depends on the transaction state, but one
known manifestation of this bug is the following level-1 message in
cache.log, combined with an access.log record showing a
much-shorter-than-client_lifetime transaction response time.

    WARNING: Closing client connection due to lifetime timeout

src/comm.cc

index 733a18c512b0f2f783d5f18feb1f69f51e0ad7ea..0d5f34d8de3d04e1e6cf722b24aa6e96bab44894 100644 (file)
@@ -1585,6 +1585,7 @@ checkTimeouts(void)
             debugs(5, 5, "checkTimeouts: FD " << fd << " auto write timeout");
             Comm::SetSelect(fd, COMM_SELECT_WRITE, NULL, NULL, 0);
             COMMIO_FD_WRITECB(fd)->finish(Comm::COMM_ERROR, ETIMEDOUT);
+            continue;
         } else if (AlreadyTimedOut(F))
             continue;