From 2ba08895534aea248d10cd148c2d8b457145a75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szymon=20Giba=C5=82a?= Date: Sat, 19 Jun 2021 16:51:20 +0200 Subject: [PATCH] tonic: propagate call to `poll_ready` in `InterceptedService` (#685) Fixes: #678 --- tonic/src/service/interceptor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tonic/src/service/interceptor.rs b/tonic/src/service/interceptor.rs index 7131bfc..831fe67 100644 --- a/tonic/src/service/interceptor.rs +++ b/tonic/src/service/interceptor.rs @@ -69,7 +69,7 @@ pub struct InterceptedService { } impl InterceptedService { - /// Create a new `InterceptedService` thats wraps `S` and intercepts each request with the + /// Create a new `InterceptedService` that wraps `S` and intercepts each request with the /// function `F`. pub fn new(service: S, f: F) -> Self where @@ -102,8 +102,8 @@ where type Future = ResponseFuture; #[inline] - fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> { - Poll::Ready(Ok(())) + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + self.inner.poll_ready(cx).map_err(Into::into) } fn call(&mut self, req: http::Request) -> Self::Future {