1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-30 20:04:26 +02:00

update actix version

This commit is contained in:
Nikolay Kim
2018-02-01 01:08:08 -08:00
parent 2b74fbf586
commit eb713bd60e
3 changed files with 10 additions and 10 deletions

View File

@ -637,14 +637,14 @@ impl<T, A, H, U, V> Handler<StopServer> for HttpServer<T, A, H, U>
}
if !self.workers.is_empty() {
Self::async_reply(
Response::async_reply(
rx.into_future().map(|_| ()).map_err(|_| ()).actfuture())
} else {
// we need to stop system if server was spawned
if self.exit {
Arbiter::system().send(actix::msgs::SystemExit(0))
}
Self::reply(Ok(()))
Response::reply(Ok(()))
}
}
}

View File

@ -124,16 +124,16 @@ impl<H> Handler<StopWorker> for Worker<H>
let num = self.settings.num_channels();
if num == 0 {
info!("Shutting down http worker, 0 connections");
Self::reply(Ok(true))
Response::reply(Ok(true))
} else if let Some(dur) = msg.graceful {
info!("Graceful http worker shutdown, {} connections", num);
let (tx, rx) = oneshot::channel();
self.shutdown_timeout(ctx, tx, dur);
Self::async_reply(rx.map_err(|_| ()).actfuture())
Response::async_reply(rx.map_err(|_| ()).actfuture())
} else {
info!("Force shutdown http worker, {} connections", num);
self.settings.head().traverse::<TcpStream, H>();
Self::reply(Ok(false))
Response::reply(Ok(false))
}
}
}