]> git.ipfire.org Git - thirdparty/squid.git/commit
Abort sendMoreData if our socket is being closed to avoid
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 20 Sep 2008 05:00:47 +0000 (23:00 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Sat, 20 Sep 2008 05:00:47 +0000 (23:00 -0600)
commit9af2f95b4f2e5139c8824dbefcbd16f7b778435c
tree057d52497673da6c4024ad234a85fd92f4315111
parent2e64fb5e53f600a9382a2d9f8aa409180c6d5778
Abort sendMoreData if our socket is being closed to avoid
comm.cc:2032: "!fd_table[fd].closing()" assertions in comm_write.

The assert happens when sendMoreData is triggered by an event on the other
(server) side.  The server side does not know that client side (or something
else) have decided to close the client socket. The close callback has not been
dialed yet so the client state has not been invalidated and non-async from
Store callbacks can reach it.

A better fix for this would be to convert more store callbacks to AsyncCalls,
but that may have to wait for client_side rewrite.

Also assert that USE_ZPH_QOS code does not use a negative socket descriptor.
The "fd = conn != NULL ? conn->fd : -1" code seems to imply that our
descriptor may be negative. I do not know whether that can actually happen.

This fix was a part of the recent cleanup effort but got lost when I split
the changes into several MERGE requests :-(.
src/client_side_reply.cc