From 008bab17f4b839c5ef2d711190775c8f9d1b1474 Mon Sep 17 00:00:00 2001 From: aiden Date: Wed, 8 Jun 2022 04:16:53 +0100 Subject: [PATCH] fixed a bug --- core/src/io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/io.c b/core/src/io.c index 864d882..caef3fe 100644 --- a/core/src/io.c +++ b/core/src/io.c @@ -89,7 +89,9 @@ void bdd_io_epoll_remove(struct bdd_io *io) { } io->in_epoll = 0; epoll_ctl(io->conversation->epoll_fd, EPOLL_CTL_DEL, bdd_io_fd(io), NULL); - io->conversation->n_in_epoll_with_events -= 1; + if ((io->epoll_events & ~EPOLLET) != 0) { + io->conversation->n_in_epoll_with_events -= 1; + } return; }