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:
@@ -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));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user