From 4712250dbb71bf4306a4427e39846aa7829c74f7 Mon Sep 17 00:00:00 2001 From: Matt Palmer Date: Sun, 9 Jun 2024 20:10:09 +1000 Subject: [PATCH] Adjust default listen address to avoid test failures --- actix-test/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actix-test/src/lib.rs b/actix-test/src/lib.rs index 90fd75835..803320607 100644 --- a/actix-test/src/lib.rs +++ b/actix-test/src/lib.rs @@ -533,7 +533,7 @@ impl TestServerConfig { tp: HttpVer::Both, stream: StreamType::Tcp, client_request_timeout: Duration::from_secs(5), - listen_address: "localhost".to_string(), + listen_address: "127.0.0.1".to_string(), port: 0, workers: 1, disable_redirects: false, @@ -611,7 +611,7 @@ impl TestServerConfig { /// Sets the address the server will listen on. /// - /// By default, only listens on `localhost`. + /// By default, only listens on `127.0.0.1`. pub fn listen_address(mut self, addr: impl Into) -> Self { self.listen_address = addr.into(); self