Commit 0002c0bd authored by JC Brand's avatar JC Brand

`converse._tearDown` shouldn't be called from converse-controlbox.js

parent 7398d414
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
onDisconnected: function () { onDisconnected: function () {
var result = this._super.onDisconnected.apply(this, arguments); var result = this._super.onDisconnected.apply(this, arguments);
if (result === 'disconnected') { if (result === 'disconnected') {
converse._tearDown();
var view = converse.chatboxviews.get('controlbox'); var view = converse.chatboxviews.get('controlbox');
view.model.set({connected:false}); view.model.set({connected:false});
view.$('#controlbox-tabs').empty(); view.$('#controlbox-tabs').empty();
......
...@@ -449,6 +449,7 @@ ...@@ -449,6 +449,7 @@
converse.reconnect(condition); converse.reconnect(condition);
return 'reconnecting'; return 'reconnecting';
} else { } else {
converse._tearDown();
converse.emit('disconnected'); converse.emit('disconnected');
return 'disconnected'; return 'disconnected';
} }
......
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