From 14fae8390d319119940ff31429b6867cc707bf3e Mon Sep 17 00:00:00 2001 From: PioLing <964472638@qq.com> Date: Sun, 9 Jun 2024 10:38:50 +0800 Subject: [PATCH] Add some epoll events (#230) --- src/Poller/EventPoller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Poller/EventPoller.cpp b/src/Poller/EventPoller.cpp index ddd18c7f..a6fed917 100644 --- a/src/Poller/EventPoller.cpp +++ b/src/Poller/EventPoller.cpp @@ -35,8 +35,8 @@ | (((event) & Event_Error) ? (EPOLLHUP | EPOLLERR) : 0) \ | (((event) & Event_LT) ? 0 : EPOLLET) -#define toPoller(epoll_event) (((epoll_event) & EPOLLIN) ? Event_Read : 0) \ - | (((epoll_event) & EPOLLOUT) ? Event_Write : 0) \ +#define toPoller(epoll_event) (((epoll_event) & (EPOLLIN | EPOLLRDNORM | EPOLLHUP)) ? Event_Read : 0) \ + | (((epoll_event) & (EPOLLOUT | EPOLLWRNORM)) ? Event_Write : 0) \ | (((epoll_event) & EPOLLHUP) ? Event_Error : 0) \ | (((epoll_event) & EPOLLERR) ? Event_Error : 0) #define create_event() epoll_create(EPOLL_SIZE)