You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log.Fatal($"An instance of {AppName} is already running");
350
+
return;
351
+
}
352
+
}
353
+
catch(IOExceptionex)
354
+
{
355
+
Log.Fatal($"I/O exception attempting to acquire the application singleton mutex; this can happen when running in a restricted environment (such as a read-only filesystem or container). Exception: {ex.Message}");
356
+
return;
357
+
}
358
+
catch(UnauthorizedAccessExceptionex)
344
359
{
345
-
Log.Fatal($"An instance of {AppName} is already running");
360
+
Log.Fatal($"Unauthorized access attempting to acquire the application singleton mutex; this can happen when running with insuffucent permissions. Exception: {ex.Message}");
361
+
return;
362
+
}
363
+
catch(Exceptionex)
364
+
{
365
+
Log.Fatal($"Failed to acquire the application singleton mutex: {ex.Message}");
346
366
return;
347
367
}
348
368
@@ -587,6 +607,15 @@ static void ListenHttps(KestrelServerOptions o, IPAddress ip)
587
607
}
588
608
finally
589
609
{
610
+
try
611
+
{
612
+
Mutex?.Dispose();
613
+
}
614
+
catch(Exception)
615
+
{
616
+
// Ignore disposal errors to prevent masking other exceptions
0 commit comments