mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Fix logic
This commit is contained in:
@@ -1531,14 +1531,14 @@ namespace ArchiSteamFarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async Task<bool?> IsSessionExpired() {
|
private async Task<bool?> IsSessionExpired() {
|
||||||
if (LastSessionCheck.AddSeconds(MinSessionValidityInSeconds) < DateTime.UtcNow) {
|
if (DateTime.UtcNow < LastSessionCheck.AddSeconds(MinSessionValidityInSeconds)) {
|
||||||
return LastSessionCheck != LastSessionRefresh;
|
return LastSessionCheck != LastSessionRefresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
await SessionSemaphore.WaitAsync().ConfigureAwait(false);
|
await SessionSemaphore.WaitAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (LastSessionCheck.AddSeconds(MinSessionValidityInSeconds) < DateTime.UtcNow) {
|
if (DateTime.UtcNow < LastSessionCheck.AddSeconds(MinSessionValidityInSeconds)) {
|
||||||
return LastSessionCheck != LastSessionRefresh;
|
return LastSessionCheck != LastSessionRefresh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user