From 46cc62c6d89c4502c887ac9ba51dd3dfea55fed3 Mon Sep 17 00:00:00 2001 From: Jiri Andras <51321834+oliverjantar@users.noreply.github.com> Date: Fri, 14 Jun 2024 19:11:32 +0200 Subject: [PATCH] Fix logging "starting service:..." (#573) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jiří Andras --- actix-server/src/server.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/actix-server/src/server.rs b/actix-server/src/server.rs index 7e092e2b..db7d67fd 100644 --- a/actix-server/src/server.rs +++ b/actix-server/src/server.rs @@ -183,11 +183,6 @@ impl ServerInner { } fn run_sync(mut builder: ServerBuilder) -> io::Result<(Self, ServerEventMultiplexer)> { - let sockets = mem::take(&mut builder.sockets) - .into_iter() - .map(|t| (t.0, t.2)) - .collect(); - // Give log information on what runtime will be used. let is_actix = actix_rt::System::try_current().is_some(); let is_tokio = tokio::runtime::Handle::try_current().is_ok(); @@ -207,6 +202,11 @@ impl ServerInner { ); } + let sockets = mem::take(&mut builder.sockets) + .into_iter() + .map(|t| (t.0, t.2)) + .collect(); + let (waker_queue, worker_handles, accept_handle) = Accept::start(sockets, &builder)?; let mux = ServerEventMultiplexer {