summaryrefslogtreecommitdiff
path: root/src/socketengines/socketengine_select.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-02 01:48:06 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-02 01:48:06 +0000
commit5af0e15f15f0b09643dcdf6da3d9eb2349d16422 (patch)
treec714d992179e35a300cefd4f9fff8b3a352cc32e /src/socketengines/socketengine_select.cpp
parent2561ede5059f0e3340466a302b404efd2381c77f (diff)
Don't send events for removed FDs when both read and write are ready
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12582 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengines/socketengine_select.cpp')
-rw-r--r--src/socketengines/socketengine_select.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index 795e844e6..3c33eb474 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -151,6 +151,8 @@ int SelectEngine::DispatchEvents()
ReadEvents++;
SetEventMask(ev, ev->GetEventMask() & ~FD_READ_WILL_BLOCK);
ev->HandleEvent(EVENT_READ);
+ if (ev != ref[i])
+ continue;
}
if (FD_ISSET (i, &wfdset))
{