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.
// TODO: can we sync call ICAPXaction::noteCommConnected here instead?
typedef CommCbMemFunT<ICAPXaction, CommConnectCbParams> 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);