Close the epoll fd
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@@ -27,6 +28,8 @@ Poller::Poller()
|
|||||||
|
|
||||||
Poller::~Poller()
|
Poller::~Poller()
|
||||||
{
|
{
|
||||||
|
if (this->epfd > 0)
|
||||||
|
::close(this->epfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Poller::add_socket_handler(SocketHandler* socket_handler)
|
void Poller::add_socket_handler(SocketHandler* socket_handler)
|
||||||
|
|||||||
Reference in New Issue
Block a user