Fix XMPP stream not getting closed properly

This commit is contained in:
Zaid Humaimidi committed 2023-02-06 14:48:00 -08:00
1 parent ccfbcddeda
commit b5f689b014
1 file changed
+4 -1
+4 -1
View File
@@ -383,7 +383,10 @@ export default class XmppClient extends EventEmitter {
} }
close(): void { close(): void {
this._socket.end("</stream>"); this._socket.end("</stream:stream>");
this._socket.removeAllListeners("data");
this._socket.removeAllListeners("error");
this.emit("close");
} }
ref(): void { ref(): void {