diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-07-07 20:17:40 +0400 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-07-07 20:17:40 +0400 |
commit | 0001d8ab26694f5f546da7e8f9d0575b49671500 (patch) | |
tree | c9b808e123dac6bb47dd392129e55f4d4f5fe4ba /uloop.c | |
parent | bbdc3bdb0505437782f83d8d0480e759cbe7ea57 (diff) |
uloop: handle EPOLLHUP like EPOLLERR to prevent infinite tight loops between epoll_wait() and the continue in uloop_run_events()
Diffstat (limited to 'uloop.c')
-rw-r--r-- | uloop.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |