yjs / y-webrtc

WebRTC Connector for Yjs
MIT License
448 stars 109 forks source link

Fix room reconnection #32

Closed YousefED closed 2 years ago

YousefED commented 2 years ago

I want to make sure the following scenario is supported:

webrtcProvider.disconnect();
webrtcProvider.connect();

This way, it would be possible to simulate a user to be offline, and then reconnect. Currently, this is not supported because the updateHandler is removed, and not reconnected.

I think this PR should fix it

dmonad commented 2 years ago

Thanks! Will publish a new release shortly.