mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 14:21:19 +00:00
Dont exit early when running only scheduled tasks (fixes #4709)
This commit is contained in:
parent
b152be7951
commit
870a0043c4
1 changed files with 9 additions and 11 deletions
|
@ -218,7 +218,6 @@ 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() {
|
||||
tokio::select! {
|
||||
_ = tokio::signal::ctrl_c() => {
|
||||
tracing::warn!("Received ctrl-c, shutting down gracefully...");
|
||||
|
@ -230,7 +229,6 @@ pub async fn start_lemmy_server(args: CmdArgs) -> LemmyResult<()> {
|
|||
tracing::warn!("Received terminate, shutting down gracefully...");
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(server) = server {
|
||||
server.stop(true).await;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue