From: Alex Rousskov Date: Sat, 25 Feb 2012 16:44:36 +0000 (-0700) Subject: Mark requests on re-pinned connections to avoid them being pconnPush()ed X-Git-Tag: BumpSslServerFirst.take05~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a44e5bbffcf240cd3a857b1fb176cbaf9fd756dc;p=thirdparty%2Fsquid.git Mark requests on re-pinned connections to avoid them being pconnPush()ed causing "fd_table[conn->fd].halfClosedReader != NULL" comm assertions later. Forward.cc comments imply that request->flags.pinned is set by ConnStateData but that is a lie. The flag is set by forward.cc itself. It was set for PINNED peers having a valid pinned connection only. When we retry a pinned pconn race, we still have a PINNED peer but the failed connection prevents us from setting the flag. If we successfuly re-pin later, we must set the flag. request->flags.pinned essentially means "the connection is or should be pinned". --- diff --git a/src/forward.cc b/src/forward.cc index 70c1551d1a..9de8f4c3ac 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -830,6 +830,7 @@ FwdState::connectDone(const Comm::ConnectionPointer &conn, comm_err_t status, in debugs(17, 3, HERE << "repinning " << serverConn); request->clientConnectionManager->pinConnection(serverConn, request, serverConn->getPeer(), request->flags.auth); + request->flags.pinned = 1; } #if USE_SSL