diff --git a/ntex-server/src/wrk.rs b/ntex-server/src/wrk.rs index 8ae0e00de..b208aa92a 100644 --- a/ntex-server/src/wrk.rs +++ b/ntex-server/src/wrk.rs @@ -69,7 +69,6 @@ impl PartialEq for Worker { } #[derive(Debug)] -#[must_use = "Future do nothing unless polled"] /// Stop worker process /// /// Stop future resolves when worker completes processing diff --git a/ntex/src/server/service.rs b/ntex/src/server/service.rs index c87e1c0b7..1fa3575ba 100644 --- a/ntex/src/server/service.rs +++ b/ntex/src/server/service.rs @@ -144,17 +144,27 @@ impl Service for StreamServiceImpl { fn poll_ready(&self, cx: &mut Context<'_>) -> Poll> { let mut ready = self.conns.available(cx); - for (idx, tag, pool, _) in self.tokens.values() { - match self.services[*idx].poll_ready(cx) { + for (idx, svc) in self.services.iter().enumerate() { + match svc.poll_ready(cx) { Poll::Pending => ready = false, Poll::Ready(Ok(())) => (), Poll::Ready(Err(_)) => { - log::error!("{}: Service readiness has failed", tag); + for (idx_, tag, _, _) in self.tokens.values() { + if idx == *idx_ { + log::error!("{}: Service readiness has failed", tag); + break; + } + } return Poll::Ready(Err(())); } } + } + + // check memory pools + for (_, _, pool, _) in self.tokens.values() { ready = pool.poll_ready(cx).is_ready() && ready; } + if ready { Poll::Ready(Ok(())) } else {