Commit 7873e6c41daf
tarball1 file changed+7-1
@@ -186,6 +186,9 @@ impl SyncTaskSupervisor {
186186
};187187
188188
let wait_to_be_online = async move {189
+ // the wasm transport ignores `RequestConfig`, and a 4xx such as a dead token is never190
+ // retried, so without growing the pause this asks for /versions every 100ms191
+ let mut pause = Duration::from_millis(100);189192
loop {190193
// Encountering network failures when sending a request which has with no retry191194
// limit set in the `RequestConfig` are treated as permanent failures and our@@ -203,7 +206,10 @@ impl SyncTaskSupervisor {
203206
// case.204207
match client.fetch_server_versions(Some(request_config)).await {205208
Ok(_) => break,206
- Err(_) => sleep(Duration::from_millis(100)).await,209
+ Err(_) => {210
+ sleep(pause).await;211
+ pause = (pause * 2).min(Duration::from_secs(10));212
+ }207213
}208214
}209215
};