Skip to content

Commit

Permalink
Do not add timeout header if it has already been added
Browse files Browse the repository at this point in the history
  • Loading branch information
maxburke committed Aug 1, 2023
1 parent 7f7bbf4 commit 95ba311
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdk/core/src/request_options/timeout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ impl Timeout {

impl AppendToUrlQuery for Timeout {
fn append_to_url_query(&self, url: &mut url::Url) {
if url.query_pairs().any(|(k, _)| k == "timeout") {
return;
}

url.query_pairs_mut()
.append_pair("timeout", &format!("{}", self.0.as_secs()));
}
Expand Down

0 comments on commit 95ba311

Please sign in to comment.