Sfoglia il codice sorgente

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.
JC Brand 8 anni fa
parent
commit
3e4095734b
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      src/converse-core.js

+ 3 - 2
src/converse-core.js

@@ -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');
         };