HocusPocusProvider V2 initiates 2 connections despite setting the connect flag to false
Description The HocusPocusProvider initiates 2 connections to our YJS backend despite setting the connect flag (from v1) to true. It should set up 1 connection.
Steps to reproduce the bug Steps to reproduce the behavior:
- Go to the examples in the repository https://github.com/BitPhinix/slate-yjs .
- Upgrade the hocuspocus version on both the client and the server.
- Open the client in a browser. And open the Network tab.
- You would see 2 connections established to the hocuspocus backend.
Expected behavior A single connection should be formed between the client and the server.
Screenshot, video, or GIF

Environment?
- operating system: MacBook Pro 2021 16 inch Apple M1 Max Ventura 13.3.1
- browser: Brave
- mobile/desktop: Desktop
- Hocuspocus version: 2.0.6
Additional context The problem seems to be in this line where the connect parameter is not passed to the configuration.: https://github.com/ueberdosis/hocuspocus/blob/ed6441c1d82e614aea388dfb84617c691d18d524/packages/provider/src/HocuspocusProvider.ts#L220
@osamatanveer I've just added an example to the provider documentation. If you want to use multiplexing, you'll have to create the websocket separately from the provider (see https://tiptap.dev/hocuspocus/provider/examples#multiplexing).
Thanks @janthurau. We're not trying to use multiplexing. It is just that when we connect using editor.connect() we see 2 web socket connection opened in the network tab. We still are facing this issue.
The same issue for me, as a dirty workaround I disconnect the configured websocket provider in addition to the Hocuspocus provider:
provider.configuration.websocketProvider.disconnect()
provider.disconnect()
Looks dirty, but works fine to me.
The same issue for me, as a dirty workaround I disconnect the configured websocket provider in addition to the Hocuspocus provider:
provider.configuration.websocketProvider.disconnect() provider.disconnect()Looks dirty, but works fine to me.
It looks like works fine to me too , thx