Skip to content

Commit

Permalink
tonic: propagate call to poll_ready in InterceptedService (#685)
Browse files Browse the repository at this point in the history
Fixes: #678
  • Loading branch information
Szymongib authored Jun 19, 2021
1 parent 4e0d2fc commit 2ba0889
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tonic/src/service/interceptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub struct InterceptedService<S, F> {
}

impl<S, F> InterceptedService<S, F> {
/// 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
Expand Down Expand Up @@ -102,8 +102,8 @@ where
type Future = ResponseFuture<S::Future>;

#[inline]
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
Poll::Ready(Ok(()))
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
self.inner.poll_ready(cx).map_err(Into::into)
}

fn call(&mut self, req: http::Request<ReqBody>) -> Self::Future {
Expand Down

0 comments on commit 2ba0889

Please sign in to comment.