console command interruption

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-16 05:17:15 +00:00
parent 1d1b1644e9
commit a22524496d
2 changed files with 33 additions and 17 deletions

View file

@ -147,6 +147,7 @@ impl Service {
async fn handle_signal(&self, #[allow(unused_variables)] sig: &'static str) {
#[cfg(feature = "console")]
if sig == "SIGINT" && services().server.running() {
self.console.interrupt();
self.console.start().await;
}
}