Add comment/code documentation

This commit is contained in:
Elias Schriefer 2020-08-30 19:41:13 +02:00
parent a453d785f5
commit 5aaf57c9bb

View File

@ -55,6 +55,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Will (afaik) be stabilized in Rust 1.48 // Will (afaik) be stabilized in Rust 1.48
// core::future::pending::<()>().await; // core::future::pending::<()>().await;
// Wait until SIGTERM (when systemd stops this service), then shutdown
tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())?.recv().await; tokio::signal::unix::signal(tokio::signal::unix::SignalKind::terminate())?.recv().await;
info!("Got SIGTERM, shutting down"); info!("Got SIGTERM, shutting down");
Ok(()) Ok(())