Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Changed devtools reconnect warning message to log info #2027

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/commands/dev/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,23 @@ async fn connect_retry(
}
Err(e) => {
failed = true;
StdErr::warn(&format!("Failed to connect to devtools instance: {}", e));
StdErr::warn(&format!(
"Will retry connection in {} seconds",
log::info!(
"Failed to connect to devtools instance: {}. Retrying in {} seconds",
e,
wait_seconds
));
);
sleep(Duration::from_secs(wait_seconds)).await;
wait_seconds *= 2;
if let (Some(sender), tungstenite::Error::Http(resp)) = (&sender, e) {
if resp.status().as_u16() >= 400 && resp.status().as_u16() < 500 {
StdOut::info(
"Starting a new session to retry the connection with a new token",
);
sender.send(Some(())).ok();
}
}
if wait_seconds > maximum_wait_seconds {
// max out at 60 seconds
wait_seconds = maximum_wait_seconds;
}
StdErr::working("Retrying...");
log::info!("Attempting to reconnect to devtools instance...");
}
}
}
Expand Down