From 83fb4978ad9c7758449d9fb71dc9eab5af442eb7 Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Sat, 6 Feb 2021 08:05:33 -0800 Subject: [PATCH] fix awc test_client test (#1960) --- awc/tests/test_client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/awc/tests/test_client.rs b/awc/tests/test_client.rs index 88987e639..8ca94ec91 100644 --- a/awc/tests/test_client.rs +++ b/awc/tests/test_client.rs @@ -722,9 +722,9 @@ async fn test_client_cookie_handling() { async fn client_unread_response() { let addr = test::unused_addr(); - std::thread::spawn(move || { - let lst = std::net::TcpListener::bind(addr).unwrap(); + let lst = std::net::TcpListener::bind(addr).unwrap(); + std::thread::spawn(move || { for stream in lst.incoming() { let mut stream = stream.unwrap(); let mut b = [0; 1000];