Changes a few things to allow reconnection upon connection loss:
If a user disconnects from the server, they are not immediately removed from the room (unless they send the room/leave notification beforehand). Instead, the peer is kept alive for 30 seconds, during which the user can attempt to reconnect. For this reconnect, they need to use the exact same JWT, as they first used - otherwise they get treated as a new user.
All requests and notifications to that user will be buffered and resubmitted upon reconnection.
If the user loses connection, the client session won't be immediately disposed. Instead, the client will attempt to reconnect. If this happens within 30 seconds, the session will be continued as normal. The user might need to resync to any changes that happened in the meantime. open-collaboration-yjs takes care of this.
Changes a few things to allow reconnection upon connection loss:
room/leave
notification beforehand). Instead, the peer is kept alive for 30 seconds, during which the user can attempt to reconnect. For this reconnect, they need to use the exact same JWT, as they first used - otherwise they get treated as a new user.open-collaboration-yjs
takes care of this.