fix unix domain mux on windows

WSAPoll really doesn't like it if you pass in POLLERR, so don't do that.
This commit is contained in:
Wez Furlong committed 2019-07-16 00:29:34 -07:00
1 parent 9370a2d07b
commit 8cc5f33600
1 file changed
+4 -2
+4 -2
View File
@@ -115,7 +115,7 @@ impl AsPollFd for SocketDescriptor {
fn as_poll_fd(&self) -> pollfd {
pollfd {
fd: *self,
events: POLLIN | POLLERR,
events: POLLIN,
revents: 0,
}
}
@@ -141,5 +141,7 @@ impl AsPollFd for UnixStream {
}
pub fn poll_for_read(pfd: &mut [pollfd]) {
poll(pfd, None).ok();
if let Err(e) = poll(pfd, None) {
log::error!("poll failed for {}", e);
}
}