summaryrefslogtreecommitdiff
path: root/src/socketengine_epoll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengine_epoll.cpp')
-rw-r--r--src/socketengine_epoll.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp
index cbf800a5c..c3c0c89a2 100644
--- a/src/socketengine_epoll.cpp
+++ b/src/socketengine_epoll.cpp
@@ -79,6 +79,9 @@ bool EPollEngine::AddFd(EventHandler* eh)
void EPollEngine::WantWrite(EventHandler* eh)
{
+ /** Use oneshot so that the system removes the writeable
+ * status for us and saves us a call.
+ */
struct epoll_event ev;
ev.events = EPOLLOUT | EPOLLONESHOT;
ev.data.fd = eh->GetFd();
@@ -87,10 +90,6 @@ void EPollEngine::WantWrite(EventHandler* eh)
{
ServerInstance->Log(DEBUG,"epoll: Could not set want write on fd %d!",eh->GetFd());
}
- else
- {
- ServerInstance->Log(DEBUG,"epoll: WantWrite set on %d",eh->GetFd());
- }
}
bool EPollEngine::DelFd(EventHandler* eh)
@@ -137,7 +136,6 @@ int EPollEngine::DispatchEvents()
ServerInstance->Log(DEBUG,"Handle %s event on fd %d",events[j].events & EPOLLOUT ? "write" : "read", events[j].data.fd);
if (events[j].events & EPOLLOUT)
{
- ServerInstance->Log(DEBUG,"One shot, we should EPOLL_CTL_MOD here to set it read only.");
struct epoll_event ev;
ev.events = EPOLLIN;
ev.data.fd = events[j].data.fd;