diff --git a/actix-server/src/worker.rs b/actix-server/src/worker.rs index aaeb45b7..6417dd0b 100644 --- a/actix-server/src/worker.rs +++ b/actix-server/src/worker.rs @@ -98,11 +98,8 @@ impl WorkerHandle { } pub fn stop(&self, graceful: bool) -> oneshot::Receiver { - let (result, rx) = oneshot::channel(); - let _ = self.tx2.send(StopCommand { - graceful, - tx: result, - }); + let (tx, rx) = oneshot::channel(); + let _ = self.tx2.send(StopCommand { graceful, tx }); rx } }