Close connections properly

deno-express
Zef Hemel 2023-05-30 16:28:52 +02:00
parent 0cef714198
commit bb36f2e6bc
1 changed files with 5 additions and 1 deletions

View File

@ -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 {