diff --git a/src/main.rs b/src/main.rs index e2d9199..32f22a3 100755 --- a/src/main.rs +++ b/src/main.rs @@ -54,7 +54,8 @@ async fn main() -> Result<()> { .expect("failed to install Ctrl+C handler"); }; - // Handle SIGTERM + // Unix SIGTERM + #[cfg(unix)] let terminate = async { signal::unix::signal(signal::unix::SignalKind::terminate()) .expect("failed to install signal handler") @@ -62,6 +63,9 @@ async fn main() -> Result<()> { .await; }; + #[cfg(not(unix))] + let terminate = std::future::pending(); + let graceful = client.clone(); let client_handle = client.run();