diff --git a/libs/sdk-common/src/tonic_wrap/mod.rs b/libs/sdk-common/src/tonic_wrap/mod.rs index 7c893d06b..765f3bd46 100644 --- a/libs/sdk-common/src/tonic_wrap/mod.rs +++ b/libs/sdk-common/src/tonic_wrap/mod.rs @@ -36,12 +36,6 @@ macro_rules! with_connection_retry { ($f:expr) => {{ use log::debug; use std::error::Error; - const BROKEN_CONNECTION_STRINGS: [&str; 4] = [ - "http2 error: keep-alive timed out", - "connection error: address not available", - "connection error: timed out", - "connection error: unexpected end of file", - ]; async { let res = $f.await; @@ -73,18 +67,13 @@ macro_rules! with_connection_retry { None => return Err(status), }; - // It's a bit of a guess which errors can occur here. hyper Io errors start - // with 'connection error'. These are some of the errors seen before. - if !BROKEN_CONNECTION_STRINGS.contains(&source.to_string().as_str()) { - debug!("transport error string is: '{}'", source.to_string()); - return Err(status); - } - debug!( - "with_connection_fallback: initial call failed due to broken connection. Retrying fallback." + "with_connection_fallback: got transport error with source '{}'. + Retrying fallback.", + source.to_string() ); $f.await } - }}; + }}; }