summaryrefslogtreecommitdiff
path: root/src/s_bsd_epoll.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/s_bsd_epoll.c')
-rw-r--r--src/s_bsd_epoll.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/s_bsd_epoll.c b/src/s_bsd_epoll.c
index 8e8de83..088a3ff 100644
--- a/src/s_bsd_epoll.c
+++ b/src/s_bsd_epoll.c
@@ -198,22 +198,26 @@ comm_select(void)
continue;
if ((ep_fdlist[i].events & (EPOLLIN | EPOLLHUP | EPOLLERR)))
+ {
if ((hdl = F->read_handler) != NULL)
{
F->read_handler = NULL;
hdl(F, F->read_data);
- if (!F->flags.open)
- continue;
+ if (!F->flags.open)
+ continue;
}
+ }
if ((ep_fdlist[i].events & (EPOLLOUT | EPOLLHUP | EPOLLERR)))
+ {
if ((hdl = F->write_handler) != NULL)
{
F->write_handler = NULL;
hdl(F, F->write_data);
- if (!F->flags.open)
- continue;
+ if (!F->flags.open)
+ continue;
}
+ }
comm_setselect(F, 0, NULL, NULL, 0);
}