Skip to content

Commit

Permalink
display actual number of connections; don't wait if stop_forcible (#957)
Browse files Browse the repository at this point in the history
* dont wait if force_stop

* debug
  • Loading branch information
davehorner authored Oct 22, 2024
1 parent 30639ed commit 7518f44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/core/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ impl<A: Acceptor + Send> Server<A> {
}
}

if alive_connections.load(Ordering::Acquire) > 0 {
tracing::info!("wait for all connections to close.");
if !force_stop_token.is_cancelled() && alive_connections.load(Ordering::Acquire) > 0 {
tracing::info!("wait for {} connections to close.",alive_connections.load(Ordering::Acquire));
notify.notified().await;
}

Expand Down

0 comments on commit 7518f44

Please sign in to comment.