From bb54874f3582d676097446ff896ad00dc9146a7f Mon Sep 17 00:00:00 2001 From: JC Brand Date: Sun, 19 Oct 2014 20:41:16 +0200 Subject: [PATCH] Add extra check before accepting a passed in connection. No use in using a passed in connection that's not connected. --- converse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/converse.js b/converse.js index a4f5203e6..5900c16dc 100644 --- a/converse.js +++ b/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