From 20d30562f5a56736ee9aecfe0a050b6fe1a66b7f Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 12 Oct 2023 13:28:13 +0200 Subject: [PATCH] Fix a flaky TCP test (#7223) --- .../test-programs/wasi-sockets-tests/src/bin/tcp_sockopts.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/test-programs/wasi-sockets-tests/src/bin/tcp_sockopts.rs b/crates/test-programs/wasi-sockets-tests/src/bin/tcp_sockopts.rs index c1a5df8ea7a5..e4016445a395 100644 --- a/crates/test-programs/wasi-sockets-tests/src/bin/tcp_sockopts.rs +++ b/crates/test-programs/wasi-sockets-tests/src/bin/tcp_sockopts.rs @@ -103,7 +103,7 @@ fn test_tcp_sockopt_inheritance(net: &Network, family: IpAddressFamily) { let bound_addr = listener.local_address().unwrap(); let client = TcpSocket::new(family).unwrap(); client.blocking_connect(&net, bound_addr).unwrap(); - let (accepted_client, _, _) = listener.accept().unwrap(); + let (accepted_client, _, _) = listener.blocking_accept().unwrap(); // Verify options on accepted socket: { @@ -157,7 +157,7 @@ fn test_tcp_sockopt_after_listen(net: &Network, family: IpAddressFamily) { let client = TcpSocket::new(family).unwrap(); client.blocking_connect(&net, bound_addr).unwrap(); - let (accepted_client, _, _) = listener.accept().unwrap(); + let (accepted_client, _, _) = listener.blocking_accept().unwrap(); // Verify options on accepted socket: {