fixed NzbDrone using 100% cpu when console not available.

This commit is contained in:
Keivan Beigi 2013-08-20 15:12:35 -07:00
commit 75a46a3abe
9 changed files with 39 additions and 31 deletions

View file

@ -1,4 +1,5 @@
using System;
using NzbDrone.Common;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Host;
@ -12,15 +13,19 @@ namespace NzbDrone.Console
{
Bootstrap.Start(new StartupArguments(args), new ConsoleAlerts());
}
catch (TerminateApplicationException)
catch (TerminateApplicationException)
{
}
catch (Exception e)
{
System.Console.WriteLine(e.ToString());
}
System.Console.WriteLine("Press enter to exit...");
System.Console.ReadLine();
if (ConsoleService.IsConsoleAvailable)
{
System.Console.WriteLine("Press enter to exit...");
System.Console.ReadLine();
}
}
}
}