fix build

This commit is contained in:
fakeshadow 2021-04-15 20:50:53 +08:00
parent edb40716a5
commit b18dd4b05f
1 changed files with 3 additions and 7 deletions

View File

@ -135,13 +135,6 @@ pub(crate) struct ServerWorker {
shutdown_timeout: Duration, shutdown_timeout: Duration,
} }
/// Set worker to unavailable when dropping.
impl Drop for ServerWorker {
fn drop(&mut self) {
self.rx.close();
}
}
struct WorkerService { struct WorkerService {
factory: usize, factory: usize,
status: WorkerServiceStatus, status: WorkerServiceStatus,
@ -377,6 +370,9 @@ impl Default for WorkerState {
impl Drop for ServerWorker { impl Drop for ServerWorker {
fn drop(&mut self) { fn drop(&mut self) {
/// Close channel on drop.
self.rx.close();
/// Stop Arbiter Self runs on on drop.
Arbiter::current().stop(); Arbiter::current().stop();
} }
} }