Files
element-x-ios/ElementX/Sources
Stefan Ceriu 04fd1bfd0e Serialise client pausing and resuming to fix the foreground resume race
Pause and resume previously ran as independent, unsynchronised tasks:
`pauseServices` stopped the sync and paused the client from a detached
`Task`, while `resumeServices` resumed and started the sync directly.
With no ordering between them, a late background pause could land after a
foreground resume — leaving the client suspended and the sync stopped
while the app was active, which broke everything until the next relaunch.

Route both through a single serialised reconciler: each request records
the desired state and chains onto the previous transition, and the
reconcile always drives the SDK to the *latest* desired state. Transitions
can no longer interleave and the most recent intent always wins.

On deinit we no longer pause the client — it's being deallocated, so the
SDK tears it down anyway; we just stop the sync and cancel the delegate.
2026-06-17 15:17:06 +03:00
..
2026-05-27 17:11:42 +01:00
2026-05-27 17:11:42 +01:00