mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-15 11:36:07 -04:00
For sliding sync that starts both the actual sliding sync request along the e2ee requests, we need to make sure that, in case of failure of sliding sync, we reset `pos` as soon as possible. With the code before this patch, the sliding sync response might be available, but the whole processing could be waiting for the e2ee requests to finish. In the updated version, we spawn the e2ee requests in a background task, then run the sliding sync request immediately and fail if it failed. Another nice benefit is that the e2ee requests won't be interrupted in the middle of processing, if the sliding sync changed parameters and we cancelled the whole sync a bit too early. Fixes #2206.