mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Avoid double session refreshes
This commit is contained in:
@@ -2405,10 +2405,14 @@ namespace ArchiSteamFarm {
|
||||
|
||||
DateTime triggeredAt = DateTime.UtcNow;
|
||||
|
||||
if (triggeredAt < LastSessionRefresh.AddSeconds(MinSessionValidityInSeconds)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
await SessionSemaphore.WaitAsync().ConfigureAwait(false);
|
||||
|
||||
try {
|
||||
if (triggeredAt < LastSessionRefresh) {
|
||||
if (triggeredAt < LastSessionRefresh.AddSeconds(MinSessionValidityInSeconds)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user