Skip to content

Commit 57acdc1

Browse files
authored
fix http3 compilation if http2 is disabled (#2304)
1 parent a75b26a commit 57acdc1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/async_impl/client.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,7 +2404,7 @@ impl PendingRequest {
24042404
self.project().headers
24052405
}
24062406

2407-
#[cfg(feature = "http2")]
2407+
#[cfg(any(feature = "http2", feature = "http3"))]
24082408
fn retry_error(mut self: Pin<&mut Self>, err: &(dyn std::error::Error + 'static)) -> bool {
24092409
use log::trace;
24102410

@@ -2464,7 +2464,7 @@ impl PendingRequest {
24642464
}
24652465
}
24662466

2467-
#[cfg(feature = "http2")]
2467+
#[cfg(any(feature = "http2", feature = "http3"))]
24682468
fn is_retryable_error(err: &(dyn std::error::Error + 'static)) -> bool {
24692469
// pop the legacy::Error
24702470
let err = if let Some(err) = err.source() {
@@ -2482,6 +2482,7 @@ fn is_retryable_error(err: &(dyn std::error::Error + 'static)) -> bool {
24822482
}
24832483
}
24842484

2485+
#[cfg(feature = "http2")]
24852486
if let Some(cause) = err.source() {
24862487
if let Some(err) = cause.downcast_ref::<h2::Error>() {
24872488
// They sent us a graceful shutdown, try with a new connection!

0 commit comments

Comments
 (0)