]> git.ipfire.org Git - thirdparty/squid.git/commit - src/ftp.cc
Bug 2896 fix: assertion failed: comm.cc:2063: "!fd_table[fd].closing()"
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 22 May 2010 00:07:57 +0000 (18:07 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sat, 22 May 2010 00:07:57 +0000 (18:07 -0600)
commita0297974162f56e0c8b35d6869c5574827bb9b3f
tree51562658c0dd288d5a2778b420500e9d28c09142
parent004f5a95462a4def89f5e4c2c8de7ad164ea48f6
Bug 2896 fix: assertion failed: comm.cc:2063: "!fd_table[fd].closing()"

When comm_close() has been called for the server fd but the close handler has
not yet been activated, the Server may receive an async call not associated
with the fd (e.g., more request body data coming from the HTTP or ICAP client)
that prompts the server to write to the fd.  We now check whether it is still
safe to write before writing. If it is not safe, we do not write but wait for
our close handler to be called.

TODO: when all comm_write callers check for fd closing, comm API can be
redefined to drop unsafe calls instead of asserting.
src/Server.cc
src/Server.h
src/ftp.cc
src/http.cc