Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Commit

Permalink
fix SmolSocket::poll_recv_from error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
stbuehler committed Nov 14, 2021
1 parent 19a15a0 commit 98393ac
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions netlink-sys/src/smol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ impl SmolSocket {
trace!("poll_recv_from socket is ready for reading");

match self.0.get_ref().recv_from(buf, 0) {
Ok(x) => {
trace!("poll_recv_from {:?} bytes read", x);
return Poll::Ready(Ok(x));
}
Err(_would_block) => {
Err(e) if e.kind() == io::ErrorKind::WouldBlock {
trace!("poll_recv_from socket would block");
continue;
}
x => {
trace!("poll_recv_from {:?} bytes read", x);
return Poll::Ready(x);
}
}
}
}
Expand Down

0 comments on commit 98393ac

Please sign in to comment.