Wait to log in before starting background tasks (#234)

This commit is contained in:
Ulyssa 2024-03-28 21:14:37 -07:00 committed by GitHub
parent 2327658e8c
commit 5a2a7b028d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -1217,6 +1217,10 @@ impl ClientWorker {
let settings = self.settings.clone();
async move {
while !client.logged_in() {
tokio::time::sleep(Duration::from_millis(100)).await;
}
let load = load_older_forever(&client, &store);
let rcpt = send_receipts_forever(&client, &store);
let room = refresh_rooms_forever(&client, &store);