Fix FdEventSource error detection
@@ -83,7 +83,7 @@ where
let (handler_ptr, evlh_ptr) = *(data as *mut (*mut c_void, *mut EventLoopHandle));
let handler = &mut *(handler_ptr as *mut H);
let evlh = &mut *(evlh_ptr);
- if mask & 0x04 > 0 {
+ if mask & 0x08 > 0 {
// EPOLLERR
use nix::sys::socket;
let err = match socket::getsockopt(fd, socket::sockopt::SocketError) {
@@ -99,7 +99,7 @@ where
}
};
handler.error(evlh, fd, IoError::from_raw_os_error(err));
- } else if mask & 0x03 > 0 {
+ } else if mask & 0x04 > 0 {
// EPOLLHUP
handler.error(
evlh,
