]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Mark requests on re-pinned connections to avoid them being pconnPush()ed
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 25 Feb 2012 16:44:36 +0000 (09:44 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sat, 25 Feb 2012 16:44:36 +0000 (09:44 -0700)
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".

src/forward.cc

index 70c1551d1ac85bfada67ac72b21fbcb7d72fe8af..9de8f4c3acaf72a0f434391828720cbf56183bf7 100644 (file)
@@ -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