Explorar el Código

Fix cancel previous reconnect timeout for iOS when reconnecting

Lennart Grahl hace 6 años
padre
commit
679aabd71e
Se han modificado 1 ficheros con 2 adiciones y 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 {