Unverified Commit c83166e2 authored by Mohsen's avatar Mohsen Committed by GitHub

Add Epoll Deconstruction function

~Epoll() will close Filedescriptor if it open in deconstruction an object
parent 1306865d
......@@ -147,6 +147,14 @@ namespace Polling {
epoll_fd = TRY_RET(epoll_create(Const::MaxEvents));
}
Epoll::~Epoll()
{
if (epoll_fd > 0)
{
close(epoll_fd);
}
}
void
Epoll::addFd(Fd fd, Flags<NotifyOn> interest, Tag tag, Mode mode) {
struct epoll_event ev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment