mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-06 09:00:13 +00:00
Respect AutoRestart in ASF.json changes
This commit is contained in:
@@ -192,7 +192,10 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
ArchiLogger.LogGenericInfo("Update process finished!");
|
||||
await RestartOrExit().ConfigureAwait(false);
|
||||
}
|
||||
|
||||
private static async Task RestartOrExit() {
|
||||
if (Program.GlobalConfig.AutoRestart) {
|
||||
ArchiLogger.LogGenericInfo("Restarting...");
|
||||
await Task.Delay(5000).ConfigureAwait(false);
|
||||
@@ -277,8 +280,8 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
if (botName.Equals(SharedInfo.ASF)) {
|
||||
ArchiLogger.LogGenericError("Global config file has been changed, restarting...");
|
||||
Program.Restart();
|
||||
ArchiLogger.LogGenericWarning("Global config file has been changed!");
|
||||
await RestartOrExit().ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user