Forráskód Böngészése

Doesn't look like its necessary to call initConnection again

JC Brand 7 éve
szülő
commit
d49adc9309
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      src/converse-core.js

+ 2 - 2
src/converse-core.js

@@ -627,7 +627,6 @@
         };
 
         this.initStatus = (reconnecting) => {
-
             // If there's no xmppstatus obj, then we were never connected to
             // begin with, so we set reconnecting to false.
             reconnecting = _.isUndefined(_converse.xmppstatus) ? false : reconnecting;
@@ -1791,6 +1790,8 @@
         };
 
         this.initConnection = function () {
+            /* Creates a new Strophe.Connection instance if we don't already have one.
+             */
             if (!this.connection) {
                 if (!this.bosh_service_url && ! this.websocket_url) {
                     throw new Error("initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.");
@@ -1927,7 +1928,6 @@
                 return _converse.connection.jid;
             },
             'login' (credentials) {
-                _converse.initConnection();
                 _converse.logIn(credentials);
             },
             'logout' () {