diff --git a/AutoUpdater.NET/AutoUpdater.cs b/AutoUpdater.NET/AutoUpdater.cs index 685df31..32e9baa 100644 --- a/AutoUpdater.NET/AutoUpdater.cs +++ b/AutoUpdater.NET/AutoUpdater.cs @@ -583,11 +583,6 @@ internal static void Exit() var currentProcess = Process.GetCurrentProcess(); foreach (Process process in Process.GetProcessesByName(currentProcess.ProcessName)) { - if (process.HasExited) - { - continue; - } - try { string processPath = process.MainModule?.FileName; @@ -604,6 +599,11 @@ internal static void Exit() .TotalMilliseconds); // Give some time to process message } + if (process.HasExited) + { + continue; + } + process.Kill(); //TODO: Show UI message asking user to close program himself instead of silently killing it } catch (Exception)