From fd3e77ea8358b7efe3fe3a11cf58d41a905dfe89 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 11 Dec 2018 14:03:06 -0800 Subject: [PATCH] fix signals handling on windows --- actix-server/CHANGES.md | 5 +++++ actix-server/Cargo.toml | 2 +- actix-server/src/signals.rs | 10 ++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/actix-server/CHANGES.md b/actix-server/CHANGES.md index 953441ef..8ff34fcf 100644 --- a/actix-server/CHANGES.md +++ b/actix-server/CHANGES.md @@ -1,5 +1,10 @@ # Changes +## [0.1.1] - 2018-12-11 + +* Fix signal handling on windows + + ## [0.1.0] - 2018-12-09 * Move server to separate crate diff --git a/actix-server/Cargo.toml b/actix-server/Cargo.toml index 4015bd79..c463f4ff 100644 --- a/actix-server/Cargo.toml +++ b/actix-server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-server" -version = "0.1.0" +version = "0.1.1" authors = ["Nikolay Kim "] description = "Actix server - General purpose tcp server" keywords = ["network", "framework", "async", "futures"] diff --git a/actix-server/src/signals.rs b/actix-server/src/signals.rs index 599628a5..c3c6dd26 100644 --- a/actix-server/src/signals.rs +++ b/actix-server/src/signals.rs @@ -34,10 +34,12 @@ impl Signals { let fut = { #[cfg(not(unix))] { - tokio_signal::ctrl_c().and_then(move |stream| Signals { - srv, - stream: Box::new(stream.map(|_| Signal::Int)), - }) + tokio_signal::ctrl_c() + .map_err(|_| ()) + .and_then(move |stream| Signals { + srv, + stream: Box::new(stream.map(|_| Signal::Int)), + }) } #[cfg(unix)]