--------------------- PatchSet 1635 Date: 2005/09/01 16:12:59 Author: dwsquid Branch: squid3-icap Tag: (none) Log: Fix an assertion triggered by a client abort. We don't really need to call comm_read_cancel() because the callback is protected by cbdata locks. Members: src/ICAPXaction.cc:1.1.2.14->1.1.2.15 Index: squid3/src/ICAPXaction.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPXaction.cc,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -u -r1.1.2.14 -r1.1.2.15 --- squid3/src/ICAPXaction.cc 31 Aug 2005 20:03:39 -0000 1.1.2.14 +++ squid3/src/ICAPXaction.cc 1 Sep 2005 16:12:59 -0000 1.1.2.15 @@ -189,8 +189,10 @@ if (connection >= 0) { commSetTimeout(connection, -1, NULL, NULL); - if (state.closer) + if (state.closer) { comm_remove_close_handler(connection, state.closer, this); + state.closer = NULL; + } stopReading(); @@ -309,6 +311,7 @@ state.closer = NULL; ICAPXaction_Enter(noteCommClose); + state.isReading = NULL; // maybe gratuitous? mustStop(notifyHttp); ICAPXaction_Exit(noteCommClose); @@ -380,8 +383,15 @@ void ICAPXaction::stopReading() { if (state.isReading) { - comm_read_cancel(connection, state.isReading, this); - state.isReading = NULL; + /* + * don't call comm_read_cancel() here, because (a) the + * callback data (this) is tracked by cbdata so the read + * handler won't be called if the object goes away, and (b) + * comm module leaves fdc_table[].read.callback set between + * the time it does the actual I/O and when we get the + * callback via a queued event. + */ + /* comm_read_cancel(connection, state.isReading, this); */ } state.doneReading = true;