From e461b22ff919ec7690f3badb05237f99dfe45b9b Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 16 Mar 2016 12:44:59 +0000 Subject: [PATCH] disconnect and reset before attempting to reconnect. --- src/converse-core.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/converse-core.js b/src/converse-core.js index 8f0f07f12..b23102590 100755 --- a/src/converse-core.js +++ b/src/converse-core.js @@ -428,6 +428,8 @@ this.reconnect = function (condition) { + this.connection.disconnect('re-connecting'); + this.connection.reset(); converse.log('Attempting to reconnect in 5 seconds'); converse.giveFeedback(__('Attempting to reconnect in 5 seconds'), 'error'); window.clearTimeout(converse.reconnectTimeout);