sdk: Wait on sync beat asynchronously

This commit is contained in:
Jonas Platte
2023-09-18 17:42:09 +02:00
committed by Jonas Platte
parent 45b7e075c9
commit beeeec34f7

View File

@@ -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(())