浏览代码

disconnect and reset before attempting to reconnect.

JC Brand 9 年之前
父节点
当前提交
e461b22ff9
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/converse-core.js

+ 2 - 0
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);