gdm: Correct placement of verification-failed emission

If we fail to verify, and don't have any pending messages, we'll retry
or cancel, which will cause a state change to VERIFYING or NOT_VERIFYING,
and then change the state again to VERIFICATION_FAILED, messing up our
state machine.
This commit is contained in:
Jasper St. Pierre 2014-03-07 18:45:21 -05:00
parent 5b4337f716
commit 82b8b32355

View File

@ -501,6 +501,8 @@ const ShellUserVerifier = new Lang.Class({
let canRetry = retry && this._userName &&
this._failCounter < this._settings.get_int(ALLOWED_FAILURES_KEY);
this.emit('verification-failed');
if (canRetry) {
if (!this.hasPendingMessages) {
this._retry();
@ -522,8 +524,6 @@ const ShellUserVerifier = new Lang.Class({
}));
}
}
this.emit('verification-failed');
},
_onConversationStopped: function(client, serviceName) {