You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A phone reconnecting while its old connection is still open can have its sync state wiped #83
Core keys its per-device sync state by device id, but connections are per socket, and both the phone and the cloud run the same code. If one side still holds an old connection to a device when a new connection from that device arrives, the old connection's eventual close deletes the state that now belongs to the new one. The cloud is the usual place for this: it never pings, so a phone that lost signal stays "connected" there for many minutes, and the phone's next visit to Exchange opens a second connection inside that window. The phone has a shorter version of the same thing, because closing a websocket over a dead link takes 30 seconds while re-entering the screen opens the new socket at once.
What the user sees depends on which side wiped its state and whether data sync had already been enabled on the new connection. If the cloud wipes before it enabled data, it never opens the data channels for the new connection: nothing syncs in either direction, the cloud shows nothing wrong, and the phone sits on "Waiting for devices" with "Remote Archive connected" underneath until the user leaves and comes back. This is the case that leaves observations and attachments off the cloud. If the cloud wipes after enabling data, the open channels keep working and the session is nearly unaffected. If the phone wipes, the phone's peer list goes empty: either nothing syncs, or data flows but the screen shows "waiting" or "no devices", autostop never arms, and the user tends to press Stop or leave, which feeds #82.
Activity