Skip to content

Error handling suggestions #7

@samghelms

Description

@samghelms

First of all, thank you so much for sharing this! Incredible work.

FYI, I found it helpful to add this.on('error', this.onDisconnect); to the constructor. Without it, I was running into issues reconnecting after closing/reopening webpages.

I also had to change removeSelfFromAwarenessOnUnload to handle some errors disconnecting.

removeSelfFromAwarenessOnUnload = () => {
    awarenessProtocol.removeAwarenessStates(this.awareness, [this.doc.clientID], 'window unload');
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions