Skip to content

Commit

Permalink
feat: allow continue after any connect actions
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit committed Mar 3, 2023
1 parent 26e33e3 commit f35eecb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libs/jwst-rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,16 @@ fn start_sync_thread(workspace: &Workspace, remote: String, mut rx: Receiver<Vec
{
Ok(true) => {
debug!("sync thread finished");
first_sync_cloned.store(true, Ordering::Release);
break;
}
Ok(false) => {
first_sync_cloned.store(true, Ordering::Release);
warn!("Remote sync connection disconnected, try again in 2 seconds");
sleep(Duration::from_secs(3)).await;
}
Err(e) => {
first_sync_cloned.store(true, Ordering::Release);
warn!("Remote sync error, try again in 3 seconds: {}", e);
sleep(Duration::from_secs(1)).await;
}
Expand Down

0 comments on commit f35eecb

Please sign in to comment.