From d73e92b3c6f4875a0d39149db38d0c78749194df Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Sun, 7 Nov 2021 20:43:51 +0000 Subject: [PATCH] move pair creator and fix doc spelling --- actix-server/src/worker.rs | 7 +++---- actix-service/src/macros.rs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/actix-server/src/worker.rs b/actix-server/src/worker.rs index 02f68294..344b7415 100644 --- a/actix-server/src/worker.rs +++ b/actix-server/src/worker.rs @@ -281,8 +281,7 @@ impl ServerWorker { let (tx2, rx2) = unbounded_channel(); let counter = Counter::new(config.max_concurrent_connections); - - let counter_clone = counter.clone(); + let pair = handle_pair(idx, tx1, tx2, counter.clone()); // get actix system context if it is set let sys = System::try_current(); @@ -345,7 +344,7 @@ impl ServerWorker { rx, rx2, services, - counter: WorkerCounter::new(idx, waker_queue, counter_clone), + counter: WorkerCounter::new(idx, waker_queue, counter), factories: factories.into_boxed_slice(), state: Default::default(), shutdown_timeout: config.shutdown_timeout, @@ -381,7 +380,7 @@ impl ServerWorker { // wait for service factories initialization factory_rx.recv().unwrap(); - Ok(handle_pair(idx, tx1, tx2, counter)) + Ok(pair) } fn restart_service(&mut self, idx: usize, factory_id: usize) { diff --git a/actix-service/src/macros.rs b/actix-service/src/macros.rs index 6cf3ef08..503cf116 100644 --- a/actix-service/src/macros.rs +++ b/actix-service/src/macros.rs @@ -1,7 +1,7 @@ /// An implementation of [`poll_ready`]() that always signals readiness. /// /// This should only be used for basic leaf services that have no concept of un-readiness. -/// For wrapper or other serivice types, use [`forward_ready!`] for simple cases or write a bespoke +/// For wrapper or other service types, use [`forward_ready!`] for simple cases or write a bespoke /// `poll_ready` implementation. /// /// [`poll_ready`]: crate::Service::poll_ready