Skip to content

Commit

Permalink
improve reconnect wait time (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci authored Apr 25, 2024
1 parent fe67ac7 commit 7cb7c73
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/extensions/client/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ impl Endpoint {
health_.on_error(&err);
_ = client_tx.send(None);
tracing::warn!("Unable to connect to endpoint: {url_} error: {err}");
tokio::time::sleep(get_backoff_time(&connect_backoff_counter)).await;
}
}
// Wait a second before trying to reconnect
tokio::time::sleep(Duration::from_secs(1)).await;
// Wait a bit before trying to reconnect
tokio::time::sleep(get_backoff_time(&connect_backoff_counter)).await;
}
});

Expand Down

0 comments on commit 7cb7c73

Please sign in to comment.