From ed2c738b062b0db98b16032f7dad5ae65810c84c Mon Sep 17 00:00:00 2001 From: Christos Tsantilas Date: Tue, 27 Jan 2009 23:53:47 +0200 Subject: [PATCH] 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. --- src/comm.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/comm.cc b/src/comm.cc index 1c965de003..23147723a9 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -2564,6 +2564,9 @@ DeferredReadManager::kickARead(DeferredRead const &aRead) { 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); -- 2.47.3