From c9ba61be3b2286583006c34edef230a34035808f Mon Sep 17 00:00:00 2001 From: EliasSchriefer Date: Sun, 6 Dec 2020 16:49:38 +0100 Subject: [PATCH] Use `core::future::pending` instead of tokio's ^C --- sfsmcd/src/main.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sfsmcd/src/main.rs b/sfsmcd/src/main.rs index dc9ad82..ed61dfd 100644 --- a/sfsmcd/src/main.rs +++ b/sfsmcd/src/main.rs @@ -121,11 +121,7 @@ async fn main() -> Result<(), Box> { true })); - // Will (afaik) be stabilized in Rust 1.48 - // 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; - info!("Got SIGTERM, shutting down"); - Ok(()) + // Has been stabilized in Rust 1.48 + core::future::pending::<()>().await; + unreachable!(); } \ No newline at end of file