We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70200f3 commit c8b5fb7Copy full SHA for c8b5fb7
src/agent/api.rs
@@ -91,9 +91,17 @@ impl AgentApi {
91
let retry = if let Some(AgentApiError::ServerUnavailable) = err.downcast_ref() {
92
true
93
} else if let Some(err) = err.downcast_ref::<::reqwest::Error>() {
94
- err.cause()
95
- .map(|cause| cause.downcast_ref::<::std::io::Error>().is_some())
96
- .unwrap_or(false)
+ let reqwest_io = err
+ .get_ref()
+ .map(|inner| inner.is::<::std::io::Error>())
97
+ .unwrap_or(false);
98
+ let hyper_io = err
99
100
+ .and_then(|inner| inner.downcast_ref::<::hyper::Error>())
101
+ .and_then(|inner| inner.cause2())
102
103
104
+ reqwest_io || hyper_io
105
} else {
106
false
107
};
0 commit comments