diff --git a/src/async_impl/client.rs b/src/async_impl/client.rs index 994fa6fda..b321a609a 100644 --- a/src/async_impl/client.rs +++ b/src/async_impl/client.rs @@ -2404,7 +2404,7 @@ impl PendingRequest { self.project().headers } - #[cfg(feature = "http2")] + #[cfg(any(feature = "http2", feature = "http3"))] fn retry_error(mut self: Pin<&mut Self>, err: &(dyn std::error::Error + 'static)) -> bool { use log::trace; @@ -2464,7 +2464,7 @@ impl PendingRequest { } } -#[cfg(feature = "http2")] +#[cfg(any(feature = "http2", feature = "http3"))] fn is_retryable_error(err: &(dyn std::error::Error + 'static)) -> bool { // pop the legacy::Error let err = if let Some(err) = err.source() { @@ -2482,6 +2482,7 @@ fn is_retryable_error(err: &(dyn std::error::Error + 'static)) -> bool { } } + #[cfg(feature = "http2")] if let Some(cause) = err.source() { if let Some(err) = cause.downcast_ref::() { // They sent us a graceful shutdown, try with a new connection!