disconnect and reset before attempting to reconnect.

This commit is contained in:
JC Brand 2016-03-16 12:44:59 +00:00
parent 5bb76b103c
commit e461b22ff9

View File

@ -428,6 +428,8 @@
this.reconnect = function (condition) { this.reconnect = function (condition) {
this.connection.disconnect('re-connecting');
this.connection.reset();
converse.log('Attempting to reconnect in 5 seconds'); converse.log('Attempting to reconnect in 5 seconds');
converse.giveFeedback(__('Attempting to reconnect in 5 seconds'), 'error'); converse.giveFeedback(__('Attempting to reconnect in 5 seconds'), 'error');
window.clearTimeout(converse.reconnectTimeout); window.clearTimeout(converse.reconnectTimeout);