Fix ASF restart

This commit is contained in:
JustArchi
2016-10-31 06:29:48 +01:00
parent 1e4d60a696
commit 549284d988
2 changed files with 6 additions and 3 deletions

View File

@@ -60,7 +60,9 @@ namespace ArchiSteamFarm {
}
internal static void Restart() {
InitShutdownSequence();
if (!InitShutdownSequence()) {
return;
}
try {
Process.Start(Assembly.GetEntryAssembly().Location, string.Join(" ", Environment.GetCommandLineArgs().Skip(1)));
@@ -68,6 +70,7 @@ namespace ArchiSteamFarm {
Logging.LogGenericException(e);
}
ShutdownResetEvent.Set();
Environment.Exit(0);
}
@@ -133,7 +136,7 @@ namespace ArchiSteamFarm {
return !string.IsNullOrEmpty(result) ? result.Trim() : null;
}
private static void Shutdown() {
internal static void Shutdown() {
if (!InitShutdownSequence()) {
return;
}