mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-27 11:40:43 +00:00
Massively improve error handling, check for EPOLLHUP & EPOLLERR etc.
- Make sure to listen for EPOLLRDHUP in watchers so users can be notified when a peer closes a connection. - Handle EPOLLHUP and EPOLLERR gracefully. Even handle spurious EPOLLHUP by means of an error counter. If we receive too many errors we now restart the epoll fd and re-add all watchers. - Return error from `epoll_ctl()` in `uev_watcher_stop()` - Ignore any error from `uev_watcher_stop()` in `uev_watcher_set()` - Move LIST_REMOVE() et al from io.c to core uev.c, should be done for timer and signal callbacks as well, of course. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
71208b7e21
commit
fe8f3f19da
3 files changed
+88
-29