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:
parent
bbdc3bdb05
commit
0001d8ab26
1 changed files with 2 additions and 2 deletions
4
uloop.c
4
uloop.c
|
@ -231,12 +231,12 @@ static void uloop_run_events(int timeout)
|
||||||
if (!u)
|
if (!u)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(events[n].events & EPOLLERR) {
|
if(events[n].events & (EPOLLERR|EPOLLHUP)) {
|
||||||
u->error = true;
|
u->error = true;
|
||||||
uloop_fd_delete(u);
|
uloop_fd_delete(u);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!(events[n].events & (EPOLLRDHUP|EPOLLIN|EPOLLOUT|EPOLLERR)))
|
if(!(events[n].events & (EPOLLRDHUP|EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(events[n].events & EPOLLRDHUP)
|
if(events[n].events & EPOLLRDHUP)
|
||||||
|
|
Loading…
Add table
Reference in a new issue