hocuspocus icon indicating copy to clipboard operation
hocuspocus copied to clipboard

Hocuspocus provider awareness bug

Open ValentaTomas opened this issue 5 years ago • 1 comments

Using @hocuspocus/[email protected]

HocuspocusProvider awareness may not be firing update/change event when you destroy the provider.

I'm using a global state to keep track of users in each document, and this global state is updated every time the awareness.on('change', ...) event fires.

  • With WebsocketProvider from y-websocket I'm correctly notified that (for example) all users, me included, exited the document and I can update the global state accordingly.
  • With HocuspocusProvider I'm seeing "myself" multiple times when I open, close, and reopen the same document.

ValentaTomas avatar Oct 03 '21 15:10 ValentaTomas

This could be side effect of the reconnect problem in #197 (just pointing out, it may be unrelated or you are just connected multiple times)

dkrym avatar Oct 03 '21 22:10 dkrym