diff --git a/ArchiSteamFarm/Core/ASF.cs b/ArchiSteamFarm/Core/ASF.cs index 52f6390b3..c5c54fc54 100644 --- a/ArchiSteamFarm/Core/ASF.cs +++ b/ArchiSteamFarm/Core/ASF.cs @@ -49,7 +49,6 @@ using ArchiSteamFarm.Web.GitHub.Data; using ArchiSteamFarm.Web.Responses; using JetBrains.Annotations; using SteamKit2; -using SteamKit2.Discovery; namespace ArchiSteamFarm.Core; @@ -676,22 +675,9 @@ public static class ASF { throw new InvalidOperationException(nameof(WebBrowser)); } - // Ensure that we ask for a list of servers if we don't have any saved servers available - IEnumerable servers = await GlobalDatabase.ServerListProvider.FetchServerListAsync().ConfigureAwait(false); - - if (!servers.Any()) { - ArchiLogger.LogGenericInfo(Strings.FormatInitializing(nameof(SteamDirectory))); - - SteamConfiguration steamConfiguration = SteamConfiguration.Create(static builder => builder.WithProtocolTypes(GlobalConfig.SteamProtocols).WithCellID(GlobalDatabase.CellID).WithServerListProvider(GlobalDatabase.ServerListProvider).WithHttpClientFactory(static () => WebBrowser.GenerateDisposableHttpClient())); - - try { - await SteamDirectory.LoadAsync(steamConfiguration).ConfigureAwait(false); - ArchiLogger.LogGenericInfo(Strings.Success); - } catch (Exception e) { - ArchiLogger.LogGenericWarningException(e); - ArchiLogger.LogGenericWarning(Strings.BotSteamDirectoryInitializationFailed); - } - } + // Kill SK2 servers cache in order to force refresh during initial connection + // TODO: This should be removed when SK2 learns to purge its stale cache itself + await GlobalDatabase.ServerListProvider.UpdateServerListAsync([]).ConfigureAwait(false); HashSet botNames; diff --git a/ArchiSteamFarm/Localization/Strings.resx b/ArchiSteamFarm/Localization/Strings.resx index c2ccda4b0..bfc68354a 100644 --- a/ArchiSteamFarm/Localization/Strings.resx +++ b/ArchiSteamFarm/Localization/Strings.resx @@ -487,9 +487,6 @@ StackTrace: Failed to disconnect the client. Abandoning this bot instance! - - Could not initialize SteamDirectory: connecting with Steam Network might take much longer than usual! - Stopping...