Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion wgbridge-rs/src/transport/ip_recv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ impl SocketpairRecv {
/// for use with the tokio reactor.
pub fn new(fd: OwnedFd, mtu: u16) -> io::Result<Self> {
set_nonblocking(&fd)?;
// SAFETY: `fd` was set to non-blocking mode immediately above.
let afd = unsafe { AsyncFd::register_with_interest(fd, Interest::READABLE)? };
Ok(Self {
afd: AsyncFd::with_interest(fd, Interest::READABLE)?,
afd,
mtu: MtuWatcher::new(mtu),
})
}
Expand Down
Loading