Explorar o código

Fix cancel previous reconnect timeout for iOS when reconnecting

Lennart Grahl %!s(int64=6) %!d(string=hai) anos
pai
achega
679aabd71e
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  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 {