diff --git a/ntex-server/src/net/test.rs b/ntex-server/src/net/test.rs index 2dea7a91..2ddae445 100644 --- a/ntex-server/src/net/test.rs +++ b/ntex-server/src/net/test.rs @@ -68,9 +68,7 @@ where let (system, addr, server) = rx.recv().unwrap(); // wait for server - while net::TcpStream::connect(addr).is_err() { - thread::sleep(std::time::Duration::from_millis(25)); - } + thread::sleep(std::time::Duration::from_millis(50)); TestServer { addr, diff --git a/ntex/src/http/test.rs b/ntex/src/http/test.rs index 7b0e3e76..01ad7f4c 100644 --- a/ntex/src/http/test.rs +++ b/ntex/src/http/test.rs @@ -252,9 +252,7 @@ where let (system, server, addr) = rx.recv().unwrap(); // wait for server - while net::TcpStream::connect(addr).is_err() { - thread::sleep(std::time::Duration::from_millis(25)); - } + thread::sleep(std::time::Duration::from_millis(50)); TestServer { addr, diff --git a/ntex/src/web/test.rs b/ntex/src/web/test.rs index 1664ea8b..1d431b2f 100644 --- a/ntex/src/web/test.rs +++ b/ntex/src/web/test.rs @@ -705,9 +705,7 @@ where let (system, server, addr) = rx.recv().unwrap(); // wait for server - while net::TcpStream::connect(addr).is_err() { - thread::sleep(std::time::Duration::from_millis(25)); - } + thread::sleep(std::time::Duration::from_millis(50)); let client = { let connector = {