1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-26 01:38:24 +00:00

potential fix for "Execution lock has fucked up"

This commit is contained in:
kay.one 2011-09-02 22:30:18 -07:00
parent 6756eb6534
commit bab358398a

View file

@ -11,6 +11,7 @@
using NzbDrone.Core.Model.Notification;
using NzbDrone.Core.Repository;
using PetaPoco;
using ThreadState = System.Threading.ThreadState;
namespace NzbDrone.Core.Providers.Jobs
{
@ -161,7 +162,7 @@ public virtual void QueueJob(Type jobType, int targetId = 0, int secondaryTarget
_isRunning = true;
}
if (_jobThread == null || !_jobThread.IsAlive)
if (_jobThread == null || _jobThread.ThreadState != ThreadState.Running)
{
Logger.Trace("Initializing queue processor thread");
@ -178,6 +179,8 @@ public virtual void QueueJob(Type jobType, int targetId = 0, int secondaryTarget
finally
{
_isRunning = false;
_jobThread.Abort();
}
};