[core] NOWEB - fix stop session

This commit is contained in:
allburov committed 2024-02-18 19:42:32 +07:00
1 parent c29397371b
commit 5b9ed029b3
1 file changed
+3 -3
+3 -3
View File
@@ -243,9 +243,9 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
}
async stop() {
this.sock.ev.removeAllListeners();
this.sock.ws.removeAllListeners();
this.sock.ws.close();
this.sock?.ev?.removeAllListeners();
this.sock?.ws?.removeAllListeners();
this.sock?.ws?.close();
this.status = WAHASessionStatus.STOPPED;
return;
}