Commit d56592fb23bd
tarball1 file changed+9-4
@@ -268,17 +268,22 @@ pub(in crate::timeline) async fn room_event_cache_updates_task(
268268
// The updates might have lagged, but the room event cache might have269269
// events, so retrieve them and add them back again to the timeline,270270
// after clearing it.271
- let (initial_events, gaps, subscriber) =271
+ // giving up here would leave the timeline alive and silent for good, still272
+ // showing its own sends from the send queue, so a failing store read is retried273
+ let mut pause = std::time::Duration::from_millis(250);274
+ let (initial_events, gaps, subscriber) = loop {272275
match room_event_cache.subscribe_with_history().await {273
- Ok(initial_events) => initial_events,276
+ Ok(initial_events) => break initial_events,274277
Err(err) => {275278
error!(276279
?err,277280
"Failed to replace the initial remote events in the event cache"278281
);279
- break;282
+ matrix_sdk::sleep::sleep(pause).await;283
+ pause = (pause * 2).min(std::time::Duration::from_secs(10));280284
}281
- };285
+ }286
+ };282287
283288
room_event_cache_subscriber = subscriber;