Commit Graph

2 Commits

Author SHA1 Message Date
prlanzarin
401ddc4014 fix: guarantee cleanup of stale data on re-subscriptions
Currently, collection cleanup code is only run when an added event
is received from the server. Where that fails is in scenarios where
a server-side collection turns empty while an affected users is
disconnected - and then reconnects. There's no removed (or updated)
event so no cleanup code is run and you have stale data.

This commit guarantees a stale data check is run whenever a subscription
is established again. The `added` check was also maintained, although
I'm not too sure anymore it's is still needed. That may need to be
revisited.
2022-10-28 13:37:41 +00:00
Tainan Felipe
f5eef03f3f Improve data structure to not break on reconnections 2021-11-03 14:37:54 -03:00