]> git.ipfire.org Git - thirdparty/squid.git/commit
Author: Stefan Fritsch <sf@sfritsch.de>
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 6 Dec 2010 02:14:40 +0000 (19:14 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 6 Dec 2010 02:14:40 +0000 (19:14 -0700)
commit44f726820207a535fb037ff5d81179305af15d25
treea17f3311e153e84d7c5516e317f5d64bf79dad45
parentb9f5f9f6534a42efe9daad371d41349e45c9b304
Author: Stefan Fritsch <sf@sfritsch.de>
Bug 3096: Squid destroys CbDataList<DeferredRead> objects too late

When server download speed exceeds client download speed, Squid creates a
CbDataList<DeferredRead> object and associates a comm_close handler with it.
When the server kicks the deferred read, the comm_close handler is canceled.
This create/cancel sequence happens every time the server-side code wants to
read but has to wait for the client, which may happen hundreds of times per
second.

Before this change, those canceled comm_close handlers were not removed from
Comm until the end of the entire server transaction, possibly accumulating
thousands of CbDataList<DeferredRead> objects tied to the socket descriptor
via the canceled but still stored close handler.

comm_remove_close_handler now immediately removes canceled close handlers to
avoid their accumulation.
src/base/AsyncCall.cc
src/base/AsyncCall.h
src/comm.cc