Skip to content

Graceful handling of disconnects #50

Description

@Frequinzy

Currently the backend logs unexpected error when the websocket is disconnected (e.g. editor is closed).

Ideally we should be able to differentiate termination from sudden disconnects (e.g. losing internet access).
Both client and server should handle both cases as gracefully as possible.

For the client this implies:

  • Sending proper termination when the editor is closed naturally.
  • Resetting things like awareness so that no ghost cursor occur.
  • On a loss of connection try to reconnect, preferably with exponential backoff to not overload a potentially unstable server
  • Store local changes in a local context see Add better offline support #49

For the server this implies:

  • Being able to distinguish a proper termination from improper or unexpected ending of the protocol
  • Perhaps it shouldn't evict the room as soon as it becomes empty to reduce load when there is a spotty connection

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions