Skip to content

Commit e9ac36c

Browse files
committed
Debug windows failure
1 parent 6f330d3 commit e9ac36c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

neqo-common/src/udp.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,14 @@ impl Socket {
2727
/// Calls [`std::net::UdpSocket::bind`] and instantiates [`quinn_udp::UdpSocketState`].
2828
pub fn bind<A: ToSocketAddrs>(addr: A) -> Result<Self, io::Error> {
2929
let socket = std::net::UdpSocket::bind(addr)?;
30+
let state = quinn_udp::UdpSocketState::new((&socket).into())?;
31+
32+
// Reverse non-blocking flag set by `UdpSocketState` to make the test non-racy
33+
#[cfg(test)]
34+
socket.set_nonblocking(false)?;
3035

3136
Ok(Self {
32-
state: quinn_udp::UdpSocketState::new((&socket).into())?,
37+
state,
3338
socket: tokio::net::UdpSocket::from_std(socket)?,
3439
})
3540
}

0 commit comments

Comments
 (0)