Please save me some time and use the following template. In 90% of all issues I can't reproduce the problem because I don't know what exactly you are doing, in which environment, or which y-* version is responsible. Just use the following template even if you think the problem is obvious.
Checklist
Describe the bug I use a rich text editor with collaborative editing named Textbus, it use yjs and y-websocket to complete collaborative function. I use this editor with y-websocket and deploy a y-websocket node server. Open the editor it will new WebsocketProvider. When more than two users edit together( A and B), it collaborate normally; when A user click v button, A user will disconnect the y-websocket and the editor will destroy, I call the provider.destroy() to disconnect the y-websocket at the same time, A user and B user disconnect the collaborative, but in the Browser console, I see the A and B still print the awareness info, the correct should B print A not. The provider.awareness is not destroy completely, it cause the two provider.awareness send the message to other user client when A user connect to the editor again. I call the provider.awareness.destroy() to close the awareness update, it should add this statement (provider.awareness.destroy()) in the provider.destroy() function or modify the awareness.off() function.
To Reproduce Steps to reproduce the behavior:
- open the two different account with the same editor
- Click a button and call provider.destroy() to disconnect the y-websocket connection.
- Open console, you will see the provider.awareness is still send message.
- When this editor is reconnect the y-websocket, it will exist two provider.awareness send message.
Expected behavior When user call the provider.destroy() the provider should be destroyed completely includes awareness.
Screenshots I'm sorry for this, due to the network limitation, I cannot provide the screenshots temporarily.
Environment Information
- Chrome / Node.js (v18.16.1) [e.g. Chrome, Firefox, Node.js]
- yjs v13.5.52, y-websocket v1.4.5.
Additional context Add any other context about the problem here.
Huly®: YJS-569
Checklist
Describe the bug I use a rich text editor with collaborative editing named Textbus, it use yjs and y-websocket to complete collaborative function. I use this editor with y-websocket and deploy a y-websocket node server. Open the editor it will new WebsocketProvider. When more than two users edit together( A and B), it collaborate normally; when A user click v button, A user will disconnect the y-websocket and the editor will destroy, I call the provider.destroy() to disconnect the y-websocket at the same time, A user and B user disconnect the collaborative, but in the Browser console, I see the A and B still print the awareness info, the correct should B print A not. The provider.awareness is not destroy completely, it cause the two provider.awareness send the message to other user client when A user connect to the editor again. I call the provider.awareness.destroy() to close the awareness update, it should add this statement (provider.awareness.destroy()) in the provider.destroy() function or modify the awareness.off() function.
To Reproduce Steps to reproduce the behavior:
Expected behavior When user call the provider.destroy() the provider should be destroyed completely includes awareness.
Screenshots I'm sorry for this, due to the network limitation, I cannot provide the screenshots temporarily.
Environment Information
Additional context Add any other context about the problem here.
Huly®: YJS-569