@@ -349,9 +349,7 @@ where
349
349
if let Some ( join_delay) = join_delay {
350
350
// if there's a join delay, then join one by one
351
351
for ( account, state) in accounts. iter ( ) . zip ( states) {
352
- swarm_clone
353
- . add_with_exponential_backoff ( account, state)
354
- . await ;
352
+ swarm_clone. add_and_retry_forever ( account, state) . await ;
355
353
tokio:: time:: sleep ( join_delay) . await ;
356
354
}
357
355
} else {
@@ -364,7 +362,7 @@ where
364
362
. map ( move |( account, state) | async {
365
363
swarm_borrow
366
364
. clone ( )
367
- . add_with_exponential_backoff ( account, state)
365
+ . add_and_retry_forever ( account, state)
368
366
. await ;
369
367
} ) ,
370
368
)
@@ -575,9 +573,9 @@ impl Swarm {
575
573
/// Add a new account to the swarm, retrying if it couldn't join. This will
576
574
/// run forever until the bot joins or the task is aborted.
577
575
///
578
- /// Exponential backoff means if it fails joining it will initially wait 10
579
- /// seconds, then 20, then 40, up to 2 minutes .
580
- pub async fn add_with_exponential_backoff < S : Component + Clone > (
576
+ /// This does exponential backoff (though very limited), starting at 5
577
+ /// seconds and doubling up to 15 seconds .
578
+ pub async fn add_and_retry_forever < S : Component + Clone > (
581
579
& mut self ,
582
580
account : & Account ,
583
581
state : S ,
0 commit comments