瀏覽代碼

Fix cancel previous reconnect timeout for iOS when reconnecting

Lennart Grahl 6 年之前
父節點
當前提交
679aabd71e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/controllers/status.ts

+ 2 - 1
src/controllers/status.ts

@@ -305,7 +305,8 @@ export class StatusController {
             };
         })();
 
-        this.$timeout(() => {
+        this.$timeout.cancel(this.reconnectTimeout);
+        this.reconnectTimeout = this.$timeout(() => {
             if (push.send) {
                 this.$log.debug(`Starting new connection with push, reason: ${push.reason}`);
             } else {