Ver código fonte

Silence warning when the push session future is already done

Lennart Grahl 6 anos atrás
pai
commit
58a9e4d998
1 arquivos alterados com 1 adições e 1 exclusões
  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));