mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Retry http request on connection error (#922)
This commit is contained in:
parent
06b89b2d18
commit
a6e52afaa0
1 changed files with 1 additions and 1 deletions
|
@ -147,7 +147,7 @@ impl Client {
|
|||
let future = (&self.0.service).ready().await?.call(request);
|
||||
|
||||
let response = match future.await {
|
||||
Err(err) if err.is_timeout() => {
|
||||
Err(err) if err.is_timeout() || err.is_connect() => {
|
||||
let duration = RETRY_DURATION_FOR_TIMEOUT;
|
||||
|
||||
info!("Received timeout error from reqwest. Delay future request by {duration:#?}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue