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);