Cover reconnection bug with a test
Opened this issue · 0 comments
PR #203 describes and fixes the following bug.
This allows the synchronizer to pick up the changes.
When a change fails to send (as during a change generated during a reconnect) the local client believes that it has already sent what the server needs. The client refuses to send that information (it's in its local in-flight list) and the server keeps re-requesting it.
The PR has the browser websocket adapter emit a peer-disconnected
event, and changes the timeout for marking clients as dead on the server adapter.
The PR was merged, but I'm still not entirely clear on the nature of the bug or why these changes fixed it.
It makes me super nervous to be "fixing" slippery stuff like this without covering the fix with a test, because there's nothing stopping someone from re-introducing the bug in the future.
I know we're scrambling to get automerge-repo into solid shape before Lisbon, and it's fine to accumulate some technical debt in the process if we absolutely need to. I just want to make sure that there's a placeholder documenting what needs to be done.