From 054f2f69e2c8f396a4ecdbc54a30a31de3cf2b97 Mon Sep 17 00:00:00 2001 From: PioLing <964472638@qq.com> Date: Thu, 25 Jul 2024 18:07:25 +0800 Subject: [PATCH] Deletet EPOLLEXCLUSIVE (#238 #226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 防止修改fd事件时报错 --- src/Poller/EventPoller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Poller/EventPoller.cpp b/src/Poller/EventPoller.cpp index ca924a86..2672e97a 100644 --- a/src/Poller/EventPoller.cpp +++ b/src/Poller/EventPoller.cpp @@ -118,7 +118,7 @@ int EventPoller::addEvent(int fd, int event, PollEventCB cb) { if (isCurrentThread()) { #if defined(HAS_EPOLL) struct epoll_event ev = {0}; - ev.events = (toEpoll(event)) | EPOLLEXCLUSIVE; + ev.events = toEpoll(event) ; ev.data.fd = fd; int ret = epoll_ctl(_event_fd, EPOLL_CTL_ADD, fd, &ev); if (ret != -1) {