From b18dd4b05f92926e41fcfc9f680ead9576c4020a Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Thu, 15 Apr 2021 20:50:53 +0800 Subject: [PATCH] fix build --- actix-server/src/worker.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/actix-server/src/worker.rs b/actix-server/src/worker.rs index 8d89fccd..cb99c99d 100644 --- a/actix-server/src/worker.rs +++ b/actix-server/src/worker.rs @@ -135,13 +135,6 @@ pub(crate) struct ServerWorker { shutdown_timeout: Duration, } -/// Set worker to unavailable when dropping. -impl Drop for ServerWorker { - fn drop(&mut self) { - self.rx.close(); - } -} - struct WorkerService { factory: usize, status: WorkerServiceStatus, @@ -377,6 +370,9 @@ impl Default for WorkerState { impl Drop for ServerWorker { fn drop(&mut self) { + /// Close channel on drop. + self.rx.close(); + /// Stop Arbiter Self runs on on drop. Arbiter::current().stop(); } }