diff --git a/uloop.c b/uloop.c index bdda0cf..38da5f6 100644 --- a/uloop.c +++ b/uloop.c @@ -231,12 +231,12 @@ static void uloop_run_events(int timeout) if (!u) continue; - if(events[n].events & EPOLLERR) { + if(events[n].events & (EPOLLERR|EPOLLHUP)) { u->error = true; uloop_fd_delete(u); } - if(!(events[n].events & (EPOLLRDHUP|EPOLLIN|EPOLLOUT|EPOLLERR))) + if(!(events[n].events & (EPOLLRDHUP|EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP))) continue; if(events[n].events & EPOLLRDHUP)