Skip to content

Commit

Permalink
Fix logging "starting service:..."
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiří Andras committed Jun 12, 2024
1 parent 912daa3 commit 62b6876
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions actix-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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 {
Expand Down

0 comments on commit 62b6876

Please sign in to comment.