Commit 3e409573 authored by JC Brand's avatar JC Brand

Call `_tearDown` when logging out.

This is necessary for cleaning up after tests (now that each test has its own
initialized converse).

Should hopefully not cause any issues when logging out during normal use.
parent 0c2c7be4
......@@ -535,12 +535,13 @@
this.logOut = function () {
converse.disconnection_cause = converse.LOGOUT;
converse.chatboxviews.closeAllChatBoxes();
converse.clearSession();
if (typeof converse.connection !== 'undefined') {
converse.connection.disconnect();
converse.connection.reset();
}
converse.clearSession();
converse._tearDown();
converse.chatboxviews.closeAllChatBoxes();
converse.emit('logout');
};
......
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