Commit 2cdd46f6 authored by JC Brand's avatar JC Brand

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).
parent 5d620237
...@@ -29,12 +29,6 @@ ...@@ -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 @@ ...@@ -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();
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment