gdm: Only disconnect verification signals when not going to retry

At the moment a failure in a background service can lead to the
various verification signals getting disconnected, even though
we still need them for a foreground service.

This commit changes the code to only disconnect when we've run
out of tries.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1821>
This commit is contained in:
Ray Strode 2021-04-28 10:44:56 -04:00 committed by Marge Bot
parent 8cfd4c969b
commit 588dd6d80a

View File

@ -690,13 +690,13 @@ var ShellUserVerifier = class {
// the dialog // the dialog
// Otherwise, when in login mode we allow ALLOWED_FAILURES attempts. // Otherwise, when in login mode we allow ALLOWED_FAILURES attempts.
// After that, we go back to the welcome screen. // After that, we go back to the welcome screen.
this._disconnectSignals();
this._filterServiceMessages(serviceName, MessageType.ERROR); this._filterServiceMessages(serviceName, MessageType.ERROR);
const doneTrying = !shouldRetry || !this._canRetry(); const doneTrying = !shouldRetry || !this._canRetry();
if (doneTrying) { if (doneTrying) {
this._disconnectSignals();
// eslint-disable-next-line no-lonely-if // eslint-disable-next-line no-lonely-if
if (!this.hasPendingMessages) { if (!this.hasPendingMessages) {
this._cancelAndReset(); this._cancelAndReset();