Fix XMPP stream not getting closed properly
This commit is contained in:
1 parent
ccfbcddeda
commit
b5f689b014
1 file changed
+4
-1
+4
-1
@@ -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 {
|
||||||
|
|||||||
Reference in new issue
Block a user