|
|
@ -34,7 +34,7 @@ namespace NzbDrone.Providers
|
|
|
|
|
|
|
|
|
|
|
|
public void Start()
|
|
|
|
public void Start()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
AppDomain.CurrentDomain.UnhandledException += ((s, e) => AppDomainException(e));
|
|
|
|
AppDomain.CurrentDomain.UnhandledException += ((s, e) => AppDomainException(e.ExceptionObject as Exception));
|
|
|
|
|
|
|
|
|
|
|
|
AppDomain.CurrentDomain.ProcessExit += ProgramExited;
|
|
|
|
AppDomain.CurrentDomain.ProcessExit += ProgramExited;
|
|
|
|
AppDomain.CurrentDomain.DomainUnload += ProgramExited;
|
|
|
|
AppDomain.CurrentDomain.DomainUnload += ProgramExited;
|
|
|
@ -43,7 +43,7 @@ namespace NzbDrone.Providers
|
|
|
|
prioCheckTimer.Elapsed += EnsurePriority;
|
|
|
|
prioCheckTimer.Elapsed += EnsurePriority;
|
|
|
|
prioCheckTimer.Enabled = true;
|
|
|
|
prioCheckTimer.Enabled = true;
|
|
|
|
|
|
|
|
|
|
|
|
_pingTimer = new Timer(60000) {AutoReset = true};
|
|
|
|
_pingTimer = new Timer(60000) { AutoReset = true };
|
|
|
|
_pingTimer.Elapsed += (PingServer);
|
|
|
|
_pingTimer.Elapsed += (PingServer);
|
|
|
|
_pingTimer.Start();
|
|
|
|
_pingTimer.Start();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -102,10 +102,9 @@ namespace NzbDrone.Providers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static void AppDomainException(object excepion)
|
|
|
|
public static void AppDomainException(Exception excepion)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Console.WriteLine("EPIC FAIL: {0}", excepion);
|
|
|
|
Console.WriteLine("EPIC FAIL: {0}", excepion);
|
|
|
|
Logger.Fatal("EPIC FAIL: {0}", excepion);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
#if DEBUG
|
|
|
|
#else
|
|
|
|
#else
|
|
|
@ -116,6 +115,8 @@ namespace NzbDrone.Providers
|
|
|
|
CurrentException = excepion as Exception
|
|
|
|
CurrentException = excepion as Exception
|
|
|
|
}.Submit();
|
|
|
|
}.Submit();
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Logger.Fatal("EPIC FAIL: {0}", excepion);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|