From 810c662c9b55908101ca085293c52c3239ef22d1 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 26 Sep 2009 14:12:45 +0000 Subject: Add FD_WANT_SINGLE_WRITE to efficiently replace FD_WANT_POLL_WRITE git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11762 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socketengines/socketengine_select.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/socketengines/socketengine_select.cpp') diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp index f089fd698..eacfc0fbf 100644 --- a/src/socketengines/socketengine_select.cpp +++ b/src/socketengines/socketengine_select.cpp @@ -89,7 +89,7 @@ int SelectEngine::DispatchEvents() int state = eh->GetEventMask(); if (state & (FD_WANT_POLL_READ | FD_WANT_FAST_READ)) FD_SET (i, &rfdset); - if (state & (FD_WANT_POLL_WRITE | FD_WANT_FAST_WRITE)) + if (state & (FD_WANT_POLL_WRITE | FD_WANT_FAST_WRITE | FD_WANT_SINGLE_WRITE)) FD_SET (i, &wfdset); FD_SET (i, &errfdset); } @@ -134,7 +134,7 @@ int SelectEngine::DispatchEvents() if (FD_ISSET (i, &wfdset)) { WriteEvents++; - SetEventMask(eh, eh->GetEventMask() & ~FD_WRITE_WILL_BLOCK); + SetEventMask(eh, eh->GetEventMask() & ~(FD_WRITE_WILL_BLOCK | FD_WANT_SINGLE_WRITE)); ev->HandleEvent(EVENT_WRITE); } } -- cgit v1.2.3