mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Slightly modify Restart()
This fixes potential ultra-rare race condition of new process WCF being unable to bind to listening socket due to old process stil occupying it
This commit is contained in:
@@ -257,19 +257,21 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Exit(int exitCode = 0) {
|
||||
internal static void Exit(byte exitCode = 0) {
|
||||
Shutdown();
|
||||
Environment.Exit(exitCode);
|
||||
}
|
||||
|
||||
internal static void Restart() {
|
||||
Shutdown();
|
||||
|
||||
try {
|
||||
Process.Start(ExecutableFile, string.Join(" ", Environment.GetCommandLineArgs().Skip(1)));
|
||||
} catch (Exception e) {
|
||||
Logging.LogGenericException(e);
|
||||
}
|
||||
|
||||
Exit();
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
internal static string GetUserInput(EUserInputType userInputType, string botName = ASF, string extraInformation = null) {
|
||||
|
||||
Reference in New Issue
Block a user