Explorar o código

Silence warning when the push session future is already done

Lennart Grahl %!s(int64=6) %!d(string=hai) anos
pai
achega
58a9e4d998
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/services/push.ts

+ 1 - 1
src/services/push.ts

@@ -228,7 +228,7 @@ export class PushSession {
             this.retryTimeoutMs = Math.min(this.retryTimeoutMs * 2, this.config.retryTimeoutMaxMs);
 
             // Maximum tries reached?
-            if (this.tries === this.config.triesMax) {
+            if (!this.doneFuture.done && this.tries === this.config.triesMax) {
                 const error = `Push session timeout after ${this.tries} tries`;
                 this.$log.warn(this.logTag, error);
                 this.doneFuture.reject(new TimeoutError(error));