summaryrefslogtreecommitdiff
path: root/louloulibs
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2016-02-24 09:28:59 +0100
committerFlorent Le Coz <louiz@louiz.org>2016-02-24 09:31:30 +0100
commitb29d94444d176604f0847985f3ecf57091d4a47b (patch)
tree908df500fd1bc3f5f7596c8429266c25ca66b65f /louloulibs
parent1f1a27c9307285fabcd8d1fe51e3bc5cb47a88b3 (diff)
downloadbiboumi-b29d94444d176604f0847985f3ecf57091d4a47b.tar.gz
biboumi-b29d94444d176604f0847985f3ecf57091d4a47b.tar.bz2
biboumi-b29d94444d176604f0847985f3ecf57091d4a47b.tar.xz
biboumi-b29d94444d176604f0847985f3ecf57091d4a47b.zip
Close the epoll fd
Diffstat (limited to 'louloulibs')
-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)