diff --git a/src/connection.c b/src/connection.c index e2d75ba7a..03a9bb08b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -153,7 +153,7 @@ int conn_fd_handler(int fd) conn->flags |= CO_FL_CONNECTED; /* remove the events before leaving */ - fdtab[fd].ev &= ~(FD_POLL_IN | FD_POLL_OUT | FD_POLL_HUP | FD_POLL_ERR); + fdtab[fd].ev &= FD_POLL_STICKY; /* commit polling changes */ conn_cond_update_polling(conn); diff --git a/src/ev_epoll.c b/src/ev_epoll.c index 870da105d..2cd596aa3 100644 --- a/src/ev_epoll.c +++ b/src/ev_epoll.c @@ -161,10 +161,10 @@ REGPRM2 static void _do_poll(struct poller *p, int exp) * them so that if nothing can be done we don't need * to poll again. */ - if (fdtab[fd].ev & (FD_POLL_IN|FD_POLL_HUP|FD_POLL_ERR)) + if (fdtab[fd].ev & FD_POLL_IN) fd_ev_set(fd, DIR_RD); - if (fdtab[fd].ev & (FD_POLL_OUT|FD_POLL_ERR)) + if (fdtab[fd].ev & FD_POLL_OUT) fd_ev_set(fd, DIR_WR); fdtab[fd].iocb(fd); diff --git a/src/ev_kqueue.c b/src/ev_kqueue.c index 54c52c2ec..36a7b7f41 100644 --- a/src/ev_kqueue.c +++ b/src/ev_kqueue.c @@ -152,10 +152,10 @@ REGPRM2 static void _do_poll(struct poller *p, int exp) * them so that if nothing can be done we don't need * to poll again. */ - if (fdtab[fd].ev & (FD_POLL_IN|FD_POLL_HUP|FD_POLL_ERR)) + if (fdtab[fd].ev & FD_POLL_IN) fd_ev_set(fd, DIR_RD); - if (fdtab[fd].ev & (FD_POLL_OUT|FD_POLL_ERR)) + if (fdtab[fd].ev & FD_POLL_OUT) fd_ev_set(fd, DIR_WR); fdtab[fd].iocb(fd); diff --git a/src/ev_poll.c b/src/ev_poll.c index 2ce4815d6..cdc357fbe 100644 --- a/src/ev_poll.c +++ b/src/ev_poll.c @@ -166,10 +166,10 @@ REGPRM2 static void _do_poll(struct poller *p, int exp) * them so that if nothing can be done we don't need * to poll again. */ - if (fdtab[fd].ev & (FD_POLL_IN|FD_POLL_HUP|FD_POLL_ERR)) + if (fdtab[fd].ev & FD_POLL_IN) fd_ev_set(fd, DIR_RD); - if (fdtab[fd].ev & (FD_POLL_OUT|FD_POLL_ERR)) + if (fdtab[fd].ev & FD_POLL_OUT) fd_ev_set(fd, DIR_WR); fdtab[fd].iocb(fd); diff --git a/src/ev_select.c b/src/ev_select.c index 0ac74e71d..356eed735 100644 --- a/src/ev_select.c +++ b/src/ev_select.c @@ -161,10 +161,10 @@ REGPRM2 static void _do_poll(struct poller *p, int exp) * them so that if nothing can be done we don't need * to poll again. */ - if (fdtab[fd].ev & (FD_POLL_IN|FD_POLL_HUP|FD_POLL_ERR)) + if (fdtab[fd].ev & FD_POLL_IN) fd_ev_set(fd, DIR_RD); - if (fdtab[fd].ev & (FD_POLL_OUT|FD_POLL_ERR)) + if (fdtab[fd].ev & FD_POLL_OUT) fd_ev_set(fd, DIR_WR); fdtab[fd].iocb(fd);