diff --git a/js/gdm/util.js b/js/gdm/util.js index 3de5d2a61..ce2e7abfd 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js @@ -223,9 +223,11 @@ var ShellUserVerifier = class { if (!this.hasPendingMessages) { this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null); } else { + const cancellable = this._cancellable; let signalId = this.connect('no-more-messages', () => { this.disconnect(signalId); - this._userVerifier.call_answer_query(serviceName, answer, this._cancellable, null); + if (!cancellable.is_cancelled()) + this._userVerifier.call_answer_query(serviceName, answer, cancellable, null); }); } } @@ -537,9 +539,10 @@ var ShellUserVerifier = class { if (!this.hasPendingMessages) { this._retry(); } else { + const cancellable = this._cancellable; let signalId = this.connect('no-more-messages', () => { this.disconnect(signalId); - if (this._cancellable && !this._cancellable.is_cancelled()) + if (!cancellable.is_cancelled()) this._retry(); }); } @@ -548,9 +551,11 @@ var ShellUserVerifier = class { if (!this.hasPendingMessages) { this._cancelAndReset(); } else { + const cancellable = this._cancellable; let signalId = this.connect('no-more-messages', () => { this.disconnect(signalId); - this._cancelAndReset(); + if (!cancellable.is_cancelled()) + this._cancelAndReset(); }); } }