diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-30 19:31:41 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-30 19:31:41 +0000 |
commit | b8f4ba8214a9ae954c506dec354020b43849c346 (patch) | |
tree | a245281936165a8d82cb28374a3e8eeb8e0a518b | |
parent | 320f16fe12544420c52a4f246aff2a98448f64c9 (diff) |
fix for (less severe) laggehness
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5586 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/socketengine_epoll.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp index 0e27e5248..cbf800a5c 100644 --- a/src/socketengine_epoll.cpp +++ b/src/socketengine_epoll.cpp @@ -80,7 +80,7 @@ bool EPollEngine::AddFd(EventHandler* eh) void EPollEngine::WantWrite(EventHandler* eh) { struct epoll_event ev; - ev.events = EPOLLOUT | EPOLLIN | EPOLLONESHOT; + ev.events = EPOLLOUT | EPOLLONESHOT; ev.data.fd = eh->GetFd(); int i = epoll_ctl(EngineHandle, EPOLL_CTL_MOD, eh->GetFd(), &ev); if (i < 0) @@ -146,8 +146,12 @@ int EPollEngine::DispatchEvents() { ServerInstance->Log(DEBUG,"epoll: Could not reset fd %d!", events[j].data.fd); } + ref[events[j].data.fd]->HandleEvent(EVENT_WRITE); + } + else + { + ref[events[j].data.fd]->HandleEvent(EVENT_READ); } - ref[events[j].data.fd]->HandleEvent(events[j].events & EPOLLOUT ? EVENT_WRITE : EVENT_READ); } return i; |