Browse Source

converse-core: cause can sometimes be DISCONNECTING

JC Brand 8 years ago
parent
commit
59ad285823
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/converse-core.js

+ 2 - 1
src/converse-core.js

@@ -413,7 +413,8 @@
                 if (converse.disconnection_cause === Strophe.Status.CONNFAIL) {
                     converse.reconnect(condition);
                     converse.log('RECONNECTING');
-                } else if (converse.disconnection_cause === Strophe.Status.DISCONNECTED) {
+                } else if (converse.disconnection_cause === Strophe.Status.DISCONNECTING ||
+                           converse.disconnection_cause === Strophe.Status.DISCONNECTED) {
                     window.setTimeout(_.partial(converse.reconnect, condition), 3000);
                     converse.log('RECONNECTING IN 3 SECONDS');
                 }