mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-10 15:23:40 -07:00
Fixed Exceptioneer, Launcher should run as priority normal
This commit is contained in:
parent
c753b315d8
commit
badcfecb93
5 changed files with 19 additions and 18 deletions
|
@ -12,21 +12,25 @@ namespace NzbDrone
|
|||
|
||||
private static void Main()
|
||||
{
|
||||
Logger.Info(Process.GetCurrentProcess().Id);
|
||||
|
||||
try
|
||||
{
|
||||
Config.ConfigureNlog();
|
||||
Logger.Info("Starting NZBDrone. Start-up Path:'{0}'", Config.ProjectRoot);
|
||||
Thread.CurrentThread.Name = "Host";
|
||||
|
||||
Process currentProcess = Process.GetCurrentProcess();
|
||||
if (currentProcess.PriorityClass < ProcessPriorityClass.Normal)
|
||||
{
|
||||
Logger.Info("Promoting process priority from {0} to {1}", currentProcess.PriorityClass, ProcessPriorityClass.Normal);
|
||||
currentProcess.PriorityClass = ProcessPriorityClass.Normal;
|
||||
}
|
||||
|
||||
currentProcess.EnableRaisingEvents = true;
|
||||
currentProcess.Exited += ProgramExited;
|
||||
|
||||
AppDomain.CurrentDomain.UnhandledException += ((s, e) => AppDomainException(e));
|
||||
AppDomain.CurrentDomain.ProcessExit += ProgramExited;
|
||||
AppDomain.CurrentDomain.DomainUnload += ProgramExited;
|
||||
Process.GetCurrentProcess().EnableRaisingEvents = true;
|
||||
Process.GetCurrentProcess().Exited += ProgramExited;
|
||||
|
||||
Config.ConfigureNlog();
|
||||
|
||||
Logger.Info("Starting NZBDrone. Start-up Path:'{0}'", Config.ProjectRoot);
|
||||
|
||||
IISController.StopServer();
|
||||
IISController.StartServer();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue