mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-10-27 11:01:16 +00:00
Fix mutex logic for single instance check
Renamed variable to clarify mutex existence and corrected the condition to properly detect if the launcher is already running.
This commit is contained in:
parent
57d0454051
commit
d3ecbd7ebe
|
|
@ -29,8 +29,8 @@ namespace WelsonJS.Launcher
|
|||
static void Main()
|
||||
{
|
||||
// create the mutex
|
||||
_mutex = new Mutex(true, "WelsonJS.Launcher", out bool isAlreadyRunning);
|
||||
if (!isAlreadyRunning)
|
||||
_mutex = new Mutex(true, "WelsonJS.Launcher", out bool mutexNotExists);
|
||||
if (!mutexNotExists)
|
||||
{
|
||||
_logger.Error("WelsonJS Launcher already running.");
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user