Skip to content

Commit c3ff95f

Browse files
committed
Prevent crash app on re-register when there is an outstanding registration
1 parent e7f89f3 commit c3ff95f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api/registerer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,11 @@ export class Registerer {
678678
// For that, calculate the delay as a percentage of the expiration time
679679
this.registrationTimer = setTimeout(() => {
680680
this.registrationTimer = undefined;
681-
this.register();
681+
if (this.waiting) {
682+
this.logger.warn("Another already ongoing, skipping re-registration")
683+
return
684+
}
685+
this.register()
682686
}, (this.refreshFrequency / 100) * expires * 1000);
683687

684688
// We are unregistered if the registration expires.

0 commit comments

Comments
 (0)