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");
|
debug!(target: "database-cleanup","Received SIGHUP");
|
||||||
}
|
}
|
||||||
_ = ctrl_c.recv() => {
|
_ = ctrl_c.recv() => {
|
||||||
debug!(target: "database-cleanup", "Received Ctrl+C, performing last cleanup");
|
debug!(target: "database-cleanup", "Received Ctrl+C");
|
||||||
perform_cleanup();
|
|
||||||
}
|
}
|
||||||
_ = terminate.recv() => {
|
_ = terminate.recv() => {
|
||||||
debug!(target: "database-cleanup","Received SIGTERM, performing last cleanup");
|
debug!(target: "database-cleanup","Received SIGTERM");
|
||||||
perform_cleanup();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(not(unix))]
|
#[cfg(not(unix))]
|
||||||
{
|
{
|
||||||
i.tick().await;
|
i.tick().await;
|
||||||
debug!(target: "database-cleanup", "Timer ticked")
|
debug!(target: "database-cleanup", "Timer ticked")
|
||||||
}
|
}
|
||||||
|
|
||||||
perform_cleanup();
|
perform_cleanup();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue