mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Many internal async improvements
This commit is contained in:
@@ -66,11 +66,16 @@ namespace ArchiSteamFarm {
|
||||
Logging.LogGenericNotice("", "Remote version: " + remoteVersion);
|
||||
Logging.LogGenericNotice("", "Consider updating yourself!");
|
||||
Thread.Sleep(5000);
|
||||
} else if (localVersion.CompareTo(remoteVersion) > 0) {
|
||||
Logging.LogGenericNotice("", "You're currently using pre-release version!");
|
||||
Logging.LogGenericNotice("", "Local version: " + localVersion);
|
||||
Logging.LogGenericNotice("", "Remote version: " + remoteVersion);
|
||||
Logging.LogGenericNotice("", "Be careful!");
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Exit(int exitCode = 0) {
|
||||
Bot.ShutdownAllBots();
|
||||
internal static async Task Exit(int exitCode = 0) {
|
||||
await Bot.ShutdownAllBots().ConfigureAwait(false);
|
||||
Environment.Exit(exitCode);
|
||||
}
|
||||
|
||||
@@ -121,8 +126,8 @@ namespace ArchiSteamFarm {
|
||||
if (!Directory.Exists(ConfigDirectoryPath)) {
|
||||
Logging.LogGenericError("Main", "Config directory doesn't exist!");
|
||||
Console.ReadLine();
|
||||
Exit(1);
|
||||
}
|
||||
Task.Run(async () => await Exit(1).ConfigureAwait(false)).Wait();
|
||||
}
|
||||
|
||||
foreach (var configFile in Directory.EnumerateFiles(ConfigDirectoryPath, "*.xml")) {
|
||||
string botName = Path.GetFileNameWithoutExtension(configFile);
|
||||
|
||||
Reference in New Issue
Block a user