uloop: handle EPOLLHUP like EPOLLERR to prevent infinite tight loops between epoll_wait() and the continue in uloop_run_events()

This commit is contained in:
Jo-Philipp Wich 2012-07-07 18:17:40 +02:00
parent bbdc3bdb05
commit 0001d8ab26

View file

@ -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)