1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-30 16:40:21 +02:00

use newer api

This commit is contained in:
Nikolay Kim
2018-02-12 22:56:47 -08:00
parent a544034c06
commit b1eec3131f
9 changed files with 22 additions and 22 deletions

View File

@@ -78,14 +78,14 @@ impl<H: HttpHandler + 'static> Worker<H> {
let num = slf.settings.num_channels();
if num == 0 {
let _ = tx.send(true);
Arbiter::arbiter().send(StopArbiter(0));
Arbiter::arbiter().do_send(StopArbiter(0));
} else if let Some(d) = dur.checked_sub(time::Duration::new(1, 0)) {
slf.shutdown_timeout(ctx, tx, d);
} else {
info!("Force shutdown http worker, {} connections", num);
slf.settings.head().traverse::<TcpStream, H>();
let _ = tx.send(false);
Arbiter::arbiter().send(StopArbiter(0));
Arbiter::arbiter().do_send(StopArbiter(0));
}
});
}