summary refs log tree commit diff
path: root/sys_util/src/poll.rs
diff options
context:
space:
mode:
Diffstat (limited to 'sys_util/src/poll.rs')
-rw-r--r--sys_util/src/poll.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys_util/src/poll.rs b/sys_util/src/poll.rs
index 762c5e4..d8ea45d 100644
--- a/sys_util/src/poll.rs
+++ b/sys_util/src/poll.rs
@@ -16,7 +16,7 @@ use std::thread;
 use std::time::Duration;
 
 use libc::{c_int, c_long, timespec, time_t, nfds_t, sigset_t, pollfd, syscall, SYS_ppoll, POLLIN,
-           EPOLL_CLOEXEC, EPOLLIN, EPOLLHUP, EPOLL_CTL_ADD, EPOLL_CTL_MOD, EPOLL_CTL_DEL,
+           POLLHUP, EPOLL_CLOEXEC, EPOLLIN, EPOLLHUP, EPOLL_CTL_ADD, EPOLL_CTL_MOD, EPOLL_CTL_DEL,
            epoll_create1, epoll_ctl, epoll_wait, epoll_event};
 
 use {Result, errno_result};
@@ -140,7 +140,7 @@ impl Poller {
 
         self.tokens.clear();
         for (pollfd, pollable) in self.pollfds.iter().zip(pollables.iter()) {
-            if (pollfd.revents & POLLIN) != 0 {
+            if (pollfd.revents & (POLLIN | POLLHUP)) != 0 {
                 self.tokens.push(pollable.0);
             }
         }