summaryrefslogtreecommitdiff
path: root/louloulibs/network/poller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'louloulibs/network/poller.cpp')
-rw-r--r--louloulibs/network/poller.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/louloulibs/network/poller.cpp b/louloulibs/network/poller.cpp
index 50e9806..0559644 100644
--- a/louloulibs/network/poller.cpp
+++ b/louloulibs/network/poller.cpp
@@ -6,6 +6,7 @@
#include <errno.h>
#include <stdio.h>
#include <signal.h>
+#include <unistd.h>
#include <cstring>
#include <iostream>
@@ -27,6 +28,8 @@ Poller::Poller()
Poller::~Poller()
{
+ if (this->epfd > 0)
+ ::close(this->epfd);
}
void Poller::add_socket_handler(SocketHandler* socket_handler)