mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-19 14:19:06 -04:00
sdk: Wait on sync beat asynchronously
This commit is contained in:
committed by
Jonas Platte
parent
45b7e075c9
commit
beeeec34f7
@@ -1221,7 +1221,7 @@ impl Room {
|
||||
// TODO do we want to return an error here if we time out? This
|
||||
// could be quite useful if someone wants to enable encryption and
|
||||
// send a message right after it's enabled.
|
||||
self.client.inner.sync_beat.listen().wait_timeout(SYNC_WAIT_TIME);
|
||||
_ = timeout(self.client.inner.sync_beat.listen(), SYNC_WAIT_TIME).await;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user