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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp
index 9cc5f90f0..7d35997c5 100644
--- a/src/socketengine_epoll.cpp
+++ b/src/socketengine_epoll.cpp
@@ -90,14 +90,16 @@ bool EPollEngine::DelFd(EventHandler* eh)
eh->Readable() ? ev.events = EPOLLIN : ev.events = EPOLLOUT;
ev.data.fd = fd;
int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev);
+
+ CurrentSetSize--;
+ ref[fd] = NULL;
+
if (i < 0)
{
ServerInstance->Log(DEBUG,"epoll: List deletion failure: %s",strerror(errno));
return false;
}
- CurrentSetSize--;
- ref[fd] = NULL;
return true;
}