]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add FwdState close handler to pinned connections.
authorAlex Rousskov <rousskov@measurement-factory.com>
Wed, 1 Feb 2012 06:05:08 +0000 (23:05 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Wed, 1 Feb 2012 06:05:08 +0000 (23:05 -0700)
Without a close handler, we will not notice when Server forcefully closed the
connection (e.g., when receiving a zero-size response due to a pconn race)
and, hence, will not retry the connection (or server an error), resulting in a
stuck client (e.g., again, when the server received a zero-size response).

src/forward.cc

index 5ed3cc6a9989d21b019e85fe6be25642f19472a9..36c6c798b214c4e4c8462225572fcacd153faeea 100644 (file)
@@ -913,6 +913,7 @@ FwdState::connectStart()
             request->flags.pinned = 1;
             if (pinned_connection->pinnedAuth())
                 request->flags.auth = 1;
+            comm_add_close_handler(serverConn->fd, fwdServerClosedWrapper, this);
             dispatch();
             return;
         }