mirror of
https://github.com/docmost/docmost.git
synced 2025-11-16 22:41:10 +10:00
update collaboration
This commit is contained in:
@ -30,10 +30,14 @@ export class CollabWsAdapter {
|
||||
return this.wss;
|
||||
}
|
||||
|
||||
public close() {
|
||||
this.wss.clients.forEach((client) => {
|
||||
client.terminate();
|
||||
});
|
||||
this.wss.close();
|
||||
public destroy() {
|
||||
try {
|
||||
this.wss.clients.forEach((client) => {
|
||||
client.terminate();
|
||||
});
|
||||
this.wss.close();
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ export class CollaborationGateway {
|
||||
this.hocuspocus.handleConnection(client, request);
|
||||
}
|
||||
|
||||
handleDestroy() {
|
||||
destroy() {
|
||||
this.hocuspocus.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ export class CollaborationModule implements OnModuleInit, OnModuleDestroy {
|
||||
}
|
||||
|
||||
onModuleDestroy(): any {
|
||||
this.collaborationGateway.handleDestroy();
|
||||
this.collabWsAdapter.close();
|
||||
this.collaborationGateway.destroy();
|
||||
this.collabWsAdapter.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user