Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dprats committed Dec 12, 2024
1 parent d302023 commit b7bf1c3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clients/cli/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ pub async fn connect_to_orchestrator_with_infinite_retry(
prover_id: &str,
) -> WebSocketStream<MaybeTlsStream<TcpStream>> {
let mut attempt = 1;
let max_attempts = 5;
let max_attempts_before_alert = 5;

loop {
match connect_to_orchestrator(ws_addr).await {
Ok(client) => {
Expand All @@ -44,7 +45,7 @@ pub async fn connect_to_orchestrator_with_infinite_retry(
2u64.pow(attempt.min(6)),
);

if attempt >= max_attempts {
if attempt >= max_attempts_before_alert {
eprintln!(
"\t\tFailed to connect after {} attempts. The Nexus team has been alerted and is looking into it. Please try again later.",
attempt,
Expand Down

0 comments on commit b7bf1c3

Please sign in to comment.