Skip to content

Commit edd0b41

Browse files
committed
fix: try_many_times: retry 5 times instead of 60
If 5 times is not enough, 60 will probably not be enough either. This is mainly an attempt of improving the situation with deltachat/deltachat-desktop#3959. The `remove_account` RPC call would make the RPC server stop responding to all other requests, which is basically equivalent to a one minute hang. Additionally, `try_many_times` appears to be unnecessary after #5814 (comment).
1 parent 1db9b77 commit edd0b41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/accounts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ impl Config {
663663
}
664664
}
665665

666-
/// Spend up to 1 minute trying to do the operation.
666+
/// Try the operation 5 times, waiting 1 second between retries.
667667
///
668668
/// Even if Delta Chat itself does not hold the file lock,
669669
/// there may be other processes such as antivirus,
@@ -681,7 +681,7 @@ where
681681
counter += 1;
682682

683683
if let Err(err) = f().await {
684-
if counter > 60 {
684+
if counter >= 5 {
685685
return Err(err);
686686
}
687687

0 commit comments

Comments
 (0)