From 23211a9fd85c19beed08e2f3d4f692c1bc6451cb Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Tue, 31 Jan 2012 23:05:08 -0700 Subject: [PATCH] Add FwdState close handler to pinned connections. 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/forward.cc b/src/forward.cc index 5ed3cc6a99..36c6c798b2 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -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; } -- 2.47.3