Bug 2505: assertion failed: comm.cc:350: "!fd_table[fd].closing()" (comment #12,bug 2505)
This patch fixes the bug reported in comment #12 of bug 2505.
In the DeferredReadManager::kickARead method it is possible that the socket in
which refers a DeferredRead object has been closed, but the DeferredReadManager
is not informed yet because the related comm_close handler has not been
executed yet.
This patch checks the socket state and if it is closing just ignore the object.
if (aRead.cancelled)
return;
+ if(aRead.theRead.fd>=0 && fd_table[aRead.theRead.fd].closing())
+ return;
+
debugs(5, 3, "Kicking deferred read on FD " << aRead.theRead.fd);
aRead.theReader(aRead.theContext, aRead.theRead);