Explorar el Código

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 hace 8 años
padre
commit
3e4095734b
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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');
         };