mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Misc
This commit is contained in:
parent
e895850f17
commit
203dc6daf6
1 changed files with 5 additions and 3 deletions
|
@ -331,6 +331,8 @@ internal sealed class GlobalCache : SerializableFile {
|
||||||
return (false, null);
|
return (false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HashSet<uint> result;
|
||||||
|
|
||||||
await using (response.ConfigureAwait(false)) {
|
await using (response.ConfigureAwait(false)) {
|
||||||
if (response.Content == null) {
|
if (response.Content == null) {
|
||||||
return (false, null);
|
return (false, null);
|
||||||
|
@ -347,7 +349,7 @@ internal sealed class GlobalCache : SerializableFile {
|
||||||
return (false, null);
|
return (false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
HashSet<uint> result = new(count);
|
result = new HashSet<uint>(count);
|
||||||
|
|
||||||
while (await reader.ReadLineAsync(cancellationToken).ConfigureAwait(false) is { Length: > 0 } line) {
|
while (await reader.ReadLineAsync(cancellationToken).ConfigureAwait(false) is { Length: > 0 } line) {
|
||||||
if (!uint.TryParse(line, out uint depotID) || (depotID == 0)) {
|
if (!uint.TryParse(line, out uint depotID) || (depotID == 0)) {
|
||||||
|
@ -358,13 +360,13 @@ internal sealed class GlobalCache : SerializableFile {
|
||||||
|
|
||||||
result.Add(depotID);
|
result.Add(depotID);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (result.Count > 0, result.ToFrozenSet());
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ASF.ArchiLogger.LogGenericWarningException(e);
|
ASF.ArchiLogger.LogGenericWarningException(e);
|
||||||
|
|
||||||
return (false, null);
|
return (false, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return (result.Count > 0, result.ToFrozenSet());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue