Skip to content

Commit

Permalink
Debug windows failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Feb 13, 2024
1 parent 6f330d3 commit e9ac36c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion neqo-common/src/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ impl Socket {
/// Calls [`std::net::UdpSocket::bind`] and instantiates [`quinn_udp::UdpSocketState`].
pub fn bind<A: ToSocketAddrs>(addr: A) -> Result<Self, io::Error> {
let socket = std::net::UdpSocket::bind(addr)?;
let state = quinn_udp::UdpSocketState::new((&socket).into())?;

// Reverse non-blocking flag set by `UdpSocketState` to make the test non-racy
#[cfg(test)]
socket.set_nonblocking(false)?;

Ok(Self {
state: quinn_udp::UdpSocketState::new((&socket).into())?,
state,
socket: tokio::net::UdpSocket::from_std(socket)?,
})
}
Expand Down

0 comments on commit e9ac36c

Please sign in to comment.