mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 17:10:13 +00:00
Accelerate initial bots startup
Files can be read in parallel after all
This commit is contained in:
@@ -244,7 +244,7 @@ namespace ArchiSteamFarm {
|
||||
|
||||
public bool ShouldSerializeWebProxyPassword() => ShouldSerializeSensitiveDetails;
|
||||
|
||||
internal static GlobalConfig Load(string filePath) {
|
||||
internal static async Task<GlobalConfig> Load(string filePath) {
|
||||
if (string.IsNullOrEmpty(filePath)) {
|
||||
ASF.ArchiLogger.LogNullError(nameof(filePath));
|
||||
return null;
|
||||
@@ -257,7 +257,7 @@ namespace ArchiSteamFarm {
|
||||
GlobalConfig globalConfig;
|
||||
|
||||
try {
|
||||
globalConfig = JsonConvert.DeserializeObject<GlobalConfig>(File.ReadAllText(filePath));
|
||||
globalConfig = JsonConvert.DeserializeObject<GlobalConfig>(await File.ReadAllTextAsync(filePath).ConfigureAwait(false));
|
||||
} catch (Exception e) {
|
||||
ASF.ArchiLogger.LogGenericException(e);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user