Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable27] preserve websocket provider queue during reconnects #5151

Merged
merged 6 commits into from
Dec 21, 2023

Commits on Dec 19, 2023

  1. fix(sync): preserve queue if sendRemainingSteps fails

    During a network disconnect
    Yjs-websocket notices missing awareness messages and closes the connection.
    In this case the remaining steps can also not be send out and the request fails.
    Preserve the queue so we can use it once the network is back up.
    
    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    58705fe View commit details
    Browse the repository at this point in the history
  2. fix(sync): keep queue around during reconnects

    When yjs does not receive awareness updates
    it will close and reopen the websocket.
    Keep the content of the queue, i.e. the outgoing steps
    so they can be send out once the connection is back.
    
    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    12c11cf View commit details
    Browse the repository at this point in the history
  3. fix(sync): ensure queue stays the same array

    Change the content of `queue` with `queue.splice`
    rather than setting `queue` to another array.
    
    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    07cd231 View commit details
    Browse the repository at this point in the history
  4. fix(sync): only clear queue after successful send

    Also add a unit test for the websocket polyfill
    
    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    f70293d View commit details
    Browse the repository at this point in the history
  5. fix(sync): clear old providers on reconnect

    avoids the old provider leaking error events.
    
    Signed-off-by: Max <[email protected]>
    max-nextcloud committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    422d227 View commit details
    Browse the repository at this point in the history
  6. chore(assets): Recompile assets

    Signed-off-by: nextcloud-command <[email protected]>
    nextcloud-command committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    4a79e63 View commit details
    Browse the repository at this point in the history