add global var to indicate server shutdown requests

This commit is contained in:
Dietmar Maurer
2019-04-01 12:03:47 +02:00
parent 3e6a7deeaa
commit 9136f857cc
2 changed files with 17 additions and 2 deletions

View File

@ -200,7 +200,10 @@ where
});
Ok(service.select(signal_handler)
.map(|_| log::info!("daemon shutting down..."))
.map_err(|_| ())
.map(|_| {
log::info!("daemon shutting down...");
crate::tools::request_shutdown();
})
.map_err(|_| ())
)
}