Don't close chatboxes after disconnection has already happened
Otherwise it attemtps to send out stanzas (causing `this.socket is null` errors when using websocket).
This commit is contained in:
parent
5d62023701
commit
2cdd46f6dc
@ -29,12 +29,6 @@
|
|||||||
// plugin architecture they will replace existing methods on the
|
// plugin architecture they will replace existing methods on the
|
||||||
// relevant objects or classes.
|
// relevant objects or classes.
|
||||||
|
|
||||||
disconnect: function () {
|
|
||||||
const { _converse } = this.__super__;
|
|
||||||
_converse.chatboxviews.closeAllChatBoxes();
|
|
||||||
return this.__super__.disconnect.apply(this, arguments);
|
|
||||||
},
|
|
||||||
|
|
||||||
initStatus: function (reconnecting) {
|
initStatus: function (reconnecting) {
|
||||||
const { _converse } = this.__super__;
|
const { _converse } = this.__super__;
|
||||||
if (!reconnecting) {
|
if (!reconnecting) {
|
||||||
@ -833,7 +827,7 @@
|
|||||||
_converse.emit('chatBoxesInitialized');
|
_converse.emit('chatBoxesInitialized');
|
||||||
});
|
});
|
||||||
|
|
||||||
_converse.api.listen.on('logout', () => {
|
_converse.api.listen.on('clearSession', () => {
|
||||||
_converse.chatboxviews.closeAllChatBoxes();
|
_converse.chatboxviews.closeAllChatBoxes();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user