mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-01 07:55:22 +02:00
Application will automatically restart on db error.
Added SyncProvider Tests
This commit is contained in:
@@ -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()
|
||||
|
Reference in New Issue
Block a user