diff --git a/lib_acl/src/stdlib/iostuff/acl_write_wait.c b/lib_acl/src/stdlib/iostuff/acl_write_wait.c index d09974bf6..cab026ed1 100644 --- a/lib_acl/src/stdlib/iostuff/acl_write_wait.c +++ b/lib_acl/src/stdlib/iostuff/acl_write_wait.c @@ -86,12 +86,14 @@ int acl_write_wait_ms(ACL_SOCKET fd, int timeout) } if ((fds.revents & (POLLHUP | POLLERR))) { + /* acl_msg_error("%s(%d), %s: %s, %s, %s, fd=%d", __FILE__, __LINE__, myname, acl_last_serror(), fds.revents & POLLHUP ? "POLLHUP" : "0", fds.revents & POLLERR ? "POLLERR" : "0", fd); + */ acl_set_error(ACL_ECONNREFUSED); return -1; } diff --git a/lib_fiber/c/src/hook/poll.c b/lib_fiber/c/src/hook/poll.c index 5993f5c5a..9ebbd6d6e 100644 --- a/lib_fiber/c/src/hook/poll.c +++ b/lib_fiber/c/src/hook/poll.c @@ -79,7 +79,9 @@ static void read_callback(EVENT *ev, FILE_EVENT *fe) for (; iter != &fe->pfds; iter = next) { next = next->succ; pfd = ring_to_appl(iter, POLLFD, me); - handle_poll_read(ev, fe, pfd); + if (pfd->pfd->events & POLLIN) { + handle_poll_read(ev, fe, pfd); + } } } @@ -129,7 +131,9 @@ static void write_callback(EVENT *ev, FILE_EVENT *fe) for (; iter != &fe->pfds; iter = next) { next = next->succ; pfd = ring_to_appl(iter, POLLFD, me); - handle_poll_write(ev, fe, pfd); + if (pfd->pfd->events & POLLOUT) { + handle_poll_write(ev, fe, pfd); + } } }