From 8e385d8b1d401b35982712bdd4865de0c9b03e09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sat, 10 Jun 2017 00:06:29 +0200 Subject: [PATCH] Fix epoll status event masks. Fixes #10. --- source/eventcore/drivers/posix/epoll.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/eventcore/drivers/posix/epoll.d b/source/eventcore/drivers/posix/epoll.d index 3460f1e..cca2283 100644 --- a/source/eventcore/drivers/posix/epoll.d +++ b/source/eventcore/drivers/posix/epoll.d @@ -69,7 +69,7 @@ final class EpollEventLoop : PosixEventLoop { ev.events |= EPOLLET; if (mask & EventMask.read) ev.events |= EPOLLIN; if (mask & EventMask.write) ev.events |= EPOLLOUT; - if (mask & EventMask.status) ev.events |= EPOLLERR|EPOLLRDHUP|EPOLLRDHUP; + if (mask & EventMask.status) ev.events |= EPOLLERR|EPOLLHUP|EPOLLRDHUP; ev.data.fd = cast(int)fd; () @trusted { epoll_ctl(m_epoll, EPOLL_CTL_ADD, cast(int)fd, &ev); } (); } @@ -88,7 +88,7 @@ final class EpollEventLoop : PosixEventLoop { //ev.events = EPOLLONESHOT; if (mask & EventMask.read) ev.events |= EPOLLIN; if (mask & EventMask.write) ev.events |= EPOLLOUT; - if (mask & EventMask.status) ev.events |= EPOLLERR|EPOLLRDHUP; + if (mask & EventMask.status) ev.events |= EPOLLERR|EPOLLHUP|EPOLLRDHUP; ev.data.fd = cast(int)fd; () @trusted { epoll_ctl(m_epoll, EPOLL_CTL_MOD, cast(int)fd, &ev); } (); }