Skip to content

Commit 8002ed0

Browse files
committed
Update UserSessionAuthentication.cs
1 parent 5e20c3d commit 8002ed0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Common/Authentication/AuthenticationHandlers/UserSessionAuthentication.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,8 @@ protected override async Task<AuthenticateResult> HandleAuthenticateAsync()
5858

5959
if (session.Expires!.Value < DateTime.UtcNow.Subtract(Duration.LoginSessionExpansionAfter))
6060
{
61-
#pragma warning disable CS4014
62-
OsTask.Run(async () =>
63-
#pragma warning restore CS4014
64-
{
65-
session.Expires = DateTime.UtcNow.Add(Duration.LoginSessionLifetime);
66-
await _sessionService.UpdateSessionAsync(session, Duration.LoginSessionLifetime);
67-
});
61+
session.Expires = DateTime.UtcNow.Add(Duration.LoginSessionLifetime);
62+
await _sessionService.UpdateSessionAsync(session, Duration.LoginSessionLifetime); // Yes, this means a bit more waiting, but that's for max one request a day, it's fineeeee
6863
}
6964

7065
_batchUpdateService.UpdateSessionLastUsed(sessionToken, DateTimeOffset.UtcNow);

0 commit comments

Comments
 (0)