From d82bfccc5b7ab707c492ee0398b2a8c4353efb19 Mon Sep 17 00:00:00 2001 From: dullbananas Date: Sat, 25 May 2024 19:33:51 -0700 Subject: [PATCH] Remove condition that's not needed anymore --- src/lib.rs | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index c69846e9e..75992dcec 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -265,17 +265,15 @@ pub async fn start_lemmy_server(args: CmdArgs) -> LemmyResult<()> { let mut interrupt = tokio::signal::unix::signal(SignalKind::interrupt())?; let mut terminate = tokio::signal::unix::signal(SignalKind::terminate())?; - if server.is_some() || federate.is_some() || scheduled_tasks.is_some() { - tokio::select! { - _ = tokio::signal::ctrl_c() => { - tracing::warn!("Received ctrl-c, shutting down gracefully..."); - } - _ = interrupt.recv() => { - tracing::warn!("Received interrupt, shutting down gracefully..."); - } - _ = terminate.recv() => { - tracing::warn!("Received terminate, shutting down gracefully..."); - } + tokio::select! { + _ = tokio::signal::ctrl_c() => { + tracing::warn!("Received ctrl-c, shutting down gracefully..."); + } + _ = interrupt.recv() => { + tracing::warn!("Received interrupt, shutting down gracefully..."); + } + _ = terminate.recv() => { + tracing::warn!("Received terminate, shutting down gracefully..."); } } if let Some(server) = server {