mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
Application will automatically restart on db error.
Added SyncProvider Tests
This commit is contained in:
parent
fcf51978f9
commit
8cade435d1
5 changed files with 65 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Data.SQLite;
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
|
@ -74,11 +75,17 @@ namespace NzbDrone.Web
|
|||
{
|
||||
Response.Redirect(Request.ApplicationPath);
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
||||
Logger.FatalException(lastError.Message, lastError);
|
||||
|
||||
if (lastError is SQLiteException)
|
||||
{
|
||||
Logger.FatalException(lastError.Message, lastError);
|
||||
Logger.Warn("Restarting application");
|
||||
HttpRuntime.UnloadAppDomain();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void Application_BeginRequest()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue