dont run perform_cleanup twice on shutdown
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
3b90932cff
commit
b5ef72826e
1 changed files with 4 additions and 4 deletions
|
@ -1093,19 +1093,19 @@ impl KeyValueDatabase {
|
|||
debug!(target: "database-cleanup","Received SIGHUP");
|
||||
}
|
||||
_ = ctrl_c.recv() => {
|
||||
debug!(target: "database-cleanup", "Received Ctrl+C, performing last cleanup");
|
||||
perform_cleanup();
|
||||
debug!(target: "database-cleanup", "Received Ctrl+C");
|
||||
}
|
||||
_ = terminate.recv() => {
|
||||
debug!(target: "database-cleanup","Received SIGTERM, performing last cleanup");
|
||||
perform_cleanup();
|
||||
debug!(target: "database-cleanup","Received SIGTERM");
|
||||
}
|
||||
};
|
||||
|
||||
#[cfg(not(unix))]
|
||||
{
|
||||
i.tick().await;
|
||||
debug!(target: "database-cleanup", "Timer ticked")
|
||||
}
|
||||
|
||||
perform_cleanup();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue