Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit c1a2c9f

Browse files
authored
fix infinite loop on request error that isn't an IO Error (#603)
1 parent 43585d8 commit c1a2c9f

File tree

1 file changed

+1
-1
lines changed
  • src/agent/reqwest-retry/src

1 file changed

+1
-1
lines changed

src/agent/reqwest-retry/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn to_backoff_response(
2222
) -> Result<Response, backoff::Error<anyhow::Error>> {
2323
fn is_transient_socket_error(error: &reqwest::Error) -> bool {
2424
let source = error.source();
25-
while let Some(err) = source {
25+
if let Some(err) = source {
2626
if let Some(io_error) = err.downcast_ref::<std::io::Error>() {
2727
match io_error.kind() {
2828
ErrorKind::ConnectionAborted

0 commit comments

Comments
 (0)