]> git.ipfire.org Git - thirdparty/squid.git/commit
Cleanup: Improve Connection Pinning management
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 8 May 2011 06:11:18 +0000 (18:11 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 8 May 2011 06:11:18 +0000 (18:11 +1200)
commitb1cf235052c14875af6e380532683431fcb097e2
tree7620930c1a5a762def8c33cdbbf3af42aa344771
parent5c4e391c2d6ab4685cef1b7fa11b5b38cd8ebb25
Cleanup: Improve Connection Pinning management

Since 1xx handing went in HttpRequest has had two links to the one
ConnStateData managing its client connection.

* Rename the 1xx link to clientConnectionManager (since it is not
  actually the connection, but the manager object controlling the FD
  usage and stats.

* Convert the pinning code to using the permanent clientConnectionManager
  link instead of a temporary pinned_connection link.

This moves all connection pinning state fully into the ConnStateData
manager objects scope.

Side changes that appear to be buggy code previously:

* do not alter pinning state at the point where the pinned connection is
  about to start being used. Changes are only relevant at the point of
  pinning or unpinning.

* unpin operation now closes the Server FD if still open. Previously
  there was the possibility that some code paths would leave server FD
  open and pconn it. (especially since the above mentioned state
  alteration cleared the "pinned" flag).
src/HttpRequest.cc
src/HttpRequest.h
src/client_side.cc
src/client_side_reply.cc
src/client_side_request.cc
src/forward.cc
src/http.cc