aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-07-22 13:53:10 +0200
committerGitHub <noreply@github.com>2020-07-22 13:53:10 +0200
commit3c1b2f11e5a0dfde7bc05655e7ffbcf936534047 (patch)
treefdc266c92ceaa856af6dd13f1e2746004c8e74a3
parent0750357916b600a4b4c27bc4babd2adcc6390473 (diff)
parent0c5ac10a68ff0d968579b67d48b0bc00580f6bf4 (diff)
Merge pull request #3646 from barronpm/incrementcount-async
Make IncrementInvalidLoginAttemptCount async.
-rw-r--r--Jellyfin.Server.Implementations/Users/UserManager.cs6
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);
}
}
}