diff --git a/actix-http/src/message.rs b/actix-http/src/message.rs index 5d9f3710e..736f35ee1 100644 --- a/actix-http/src/message.rs +++ b/actix-http/src/message.rs @@ -348,12 +348,6 @@ pub struct Message { head: Rc, } -impl Clone for Message { - fn clone(&self) -> Self { - panic!("Message type should not be Clone.") - } -} - impl Message { /// Get new message from the pool of objects pub fn new() -> Self { diff --git a/awc/tests/test_client.rs b/awc/tests/test_client.rs index 88987e639..0ef04aa60 100644 --- a/awc/tests/test_client.rs +++ b/awc/tests/test_client.rs @@ -722,9 +722,11 @@ async fn test_client_cookie_handling() { async fn client_unread_response() { let addr = test::unused_addr(); + let (tx, rx) = std::sync::mpsc::sync_channel(1); + std::thread::spawn(move || { let lst = std::net::TcpListener::bind(addr).unwrap(); - + tx.send(()).unwrap(); for stream in lst.incoming() { let mut stream = stream.unwrap(); let mut b = [0; 1000]; @@ -738,6 +740,8 @@ async fn client_unread_response() { } }); + rx.recv().unwrap(); + // client request let req = awc::Client::new().get(format!("http://{}/", addr).as_str()); let mut res = req.send().await.unwrap();