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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp
index 381701093..97efec127 100644
--- a/src/socketengine_epoll.cpp
+++ b/src/socketengine_epoll.cpp
@@ -48,7 +48,6 @@ bool EPollEngine::AddFd(EventHandler* eh)
if (ref[fd])
return false;
- ref[fd] = eh;
struct epoll_event ev;
memset(&ev,0,sizeof(struct epoll_event));
eh->Readable() ? ev.events = EPOLLIN : ev.events = EPOLLOUT;
@@ -60,6 +59,8 @@ bool EPollEngine::AddFd(EventHandler* eh)
}
ServerInstance->Log(DEBUG,"New file descriptor: %d", fd);
+
+ ref[fd] = eh;
CurrentSetSize++;
return true;
}