فهرست منبع

Add extra check before accepting a passed in connection.

No use in using a passed in connection that's not connected.
JC Brand 10 سال پیش
والد
کامیت
bb54874f35
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      converse.js

+ 1 - 1
converse.js

@@ -4530,7 +4530,7 @@
 
         this.initConnection = function () {
             var rid, sid, jid;
-            if (this.connection) {
+            if (this.connection && this.connection.connected) {
                 this.onConnected();
             } else {
                 // XXX: it's not yet clear what the order of preference should