diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-07-22 13:53:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-22 13:53:10 +0200 |
| commit | 3c1b2f11e5a0dfde7bc05655e7ffbcf936534047 (patch) | |
| tree | fdc266c92ceaa856af6dd13f1e2746004c8e74a3 | |
| parent | 0750357916b600a4b4c27bc4babd2adcc6390473 (diff) | |
| parent | 0c5ac10a68ff0d968579b67d48b0bc00580f6bf4 (diff) | |
Merge pull request #3646 from barronpm/incrementcount-async
Make IncrementInvalidLoginAttemptCount async.
| -rw-r--r-- | Jellyfin.Server.Implementations/Users/UserManager.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server.Implementations/Users/UserManager.cs b/Jellyfin.Server.Implementations/Users/UserManager.cs index 343f452c7..52e09a55a 100644 --- a/Jellyfin.Server.Implementations/Users/UserManager.cs +++ b/Jellyfin.Server.Implementations/Users/UserManager.cs @@ -512,7 +512,7 @@ namespace Jellyfin.Server.Implementations.Users } else { - IncrementInvalidLoginAttemptCount(user); + await IncrementInvalidLoginAttemptCount(user).ConfigureAwait(false); _logger.LogInformation( "Authentication request for {UserName} has been denied (IP: {IP}).", user.Username, @@ -882,7 +882,7 @@ namespace Jellyfin.Server.Implementations.Users } } - private void IncrementInvalidLoginAttemptCount(User user) + private async Task IncrementInvalidLoginAttemptCount(User user) { user.InvalidLoginAttemptCount++; int? maxInvalidLogins = user.LoginAttemptsBeforeLockout; @@ -896,7 +896,7 @@ namespace Jellyfin.Server.Implementations.Users user.InvalidLoginAttemptCount); } - UpdateUser(user); + await UpdateUserAsync(user).ConfigureAwait(false); } } } |
