From: Amos Jeffries Date: Sun, 14 Dec 2008 05:10:43 +0000 (+1300) Subject: Author: Christos Tsantilas X-Git-Tag: SQUID_3_2_0_1~1293 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d4d11c2069b4d96fb4b4c87771c4a27e256b74bb;p=thirdparty%2Fsquid.git Author: Christos Tsantilas Bug 2508: comm.cc:2035 assertion fd_table[fd].closing() The bug here is that the filedescriptor is not passed with the other parameters to the asyncCall. If the filedescriptor closed before the asyncCall scheduled the execution of the asyncCall will not canceled and the ICAPXaction::noteCommConnected will try to read/write on a closed socket. AYJ: Not entirely certain this fix and bug go together, but they appear to and it definately fixes a different related assertion. --- diff --git a/src/ICAP/ICAPXaction.cc b/src/ICAP/ICAPXaction.cc index f9bd294ca4..f0958a2708 100644 --- a/src/ICAP/ICAPXaction.cc +++ b/src/ICAP/ICAPXaction.cc @@ -84,6 +84,7 @@ void ICAPXaction::openConnection() // TODO: can we sync call ICAPXaction::noteCommConnected here instead? typedef CommCbMemFunT Dialer; Dialer dialer(this, &ICAPXaction::noteCommConnected); + dialer.params.fd = connection; dialer.params.flag = COMM_OK; // fake other parameters by copying from the existing connection connector = asyncCall(93,3, "ICAPXaction::noteCommConnected", dialer);