Skip to content

Commit

Permalink
fix: prevent freeze when hitting network errors in a retry strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Jan 17, 2023
1 parent e77f906 commit d423be2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/client/base/async_std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ async fn send_inner(
Ok(response) => response,
Err(err) => {
last_error = StripeError::from(err);
tries += 1;
continue;
}
};
Expand Down
1 change: 1 addition & 0 deletions src/client/base/tokio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ async fn send_inner(
Ok(response) => response,
Err(err) => {
last_error = StripeError::from(err);
tries += 1;
continue;
}
};
Expand Down

0 comments on commit d423be2

Please sign in to comment.