diff --git a/web/cm_plugins/collab.ts b/web/cm_plugins/collab.ts index 57f0988a..730c1b93 100644 --- a/web/cm_plugins/collab.ts +++ b/web/cm_plugins/collab.ts @@ -46,8 +46,12 @@ export class CollabState { } stop() { - this.collabProvider.disconnect(); + // this.collabProvider.disconnect(); + console.log("[COLLAB] Destroying collab provider"); this.collabProvider.destroy(); + // For whatever reason, destroy() doesn't properly clean up everything so we need to help a bit + this.collabProvider.configuration.websocketProvider.webSocket = null; + this.collabProvider.configuration.websocketProvider.destroy(); } collabExtension(): Extension {