diff --git a/quinn-udp/tests/tests.rs b/quinn-udp/tests/tests.rs index 2b690a4723..088b73febf 100644 --- a/quinn-udp/tests/tests.rs +++ b/quinn-udp/tests/tests.rs @@ -93,6 +93,9 @@ fn test_send_recv(send: &Socket, recv: &Socket, transmit: Transmit) { let send_state = UdpSocketState::new((&send).into()).unwrap(); let recv_state = UdpSocketState::new((&recv).into()).unwrap(); + // Reverse non-blocking flag set by `UdpSocketState` to make the test non-racy + recv.set_nonblocking(false).unwrap(); + send_state .send((&send).into(), slice::from_ref(&transmit)) .unwrap();