From 203dc6daf6d96480e4ad038bb08ac465d5a83e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Sun, 19 May 2024 21:36:37 +0200 Subject: [PATCH] Misc --- .../GlobalCache.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs index 9b9e3570a..402b44fb7 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/GlobalCache.cs @@ -331,6 +331,8 @@ internal sealed class GlobalCache : SerializableFile { return (false, null); } + HashSet result; + await using (response.ConfigureAwait(false)) { if (response.Content == null) { return (false, null); @@ -347,7 +349,7 @@ internal sealed class GlobalCache : SerializableFile { return (false, null); } - HashSet result = new(count); + result = new HashSet(count); while (await reader.ReadLineAsync(cancellationToken).ConfigureAwait(false) is { Length: > 0 } line) { if (!uint.TryParse(line, out uint depotID) || (depotID == 0)) { @@ -358,13 +360,13 @@ internal sealed class GlobalCache : SerializableFile { result.Add(depotID); } - - return (result.Count > 0, result.ToFrozenSet()); } catch (Exception e) { ASF.ArchiLogger.LogGenericWarningException(e); return (false, null); } } + + return (result.Count > 0, result.ToFrozenSet()); } }