mirror of https://github.com/Sonarr/Sonarr
potential fix for "Execution lock has fucked up"
This commit is contained in:
parent
6756eb6534
commit
bab358398a
|
@ -11,6 +11,7 @@ using NzbDrone.Core.Model;
|
||||||
using NzbDrone.Core.Model.Notification;
|
using NzbDrone.Core.Model.Notification;
|
||||||
using NzbDrone.Core.Repository;
|
using NzbDrone.Core.Repository;
|
||||||
using PetaPoco;
|
using PetaPoco;
|
||||||
|
using ThreadState = System.Threading.ThreadState;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Providers.Jobs
|
namespace NzbDrone.Core.Providers.Jobs
|
||||||
{
|
{
|
||||||
|
@ -161,7 +162,7 @@ namespace NzbDrone.Core.Providers.Jobs
|
||||||
_isRunning = true;
|
_isRunning = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_jobThread == null || !_jobThread.IsAlive)
|
if (_jobThread == null || _jobThread.ThreadState != ThreadState.Running)
|
||||||
{
|
{
|
||||||
Logger.Trace("Initializing queue processor thread");
|
Logger.Trace("Initializing queue processor thread");
|
||||||
|
|
||||||
|
@ -178,6 +179,8 @@ namespace NzbDrone.Core.Providers.Jobs
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
_isRunning = false;
|
_isRunning = false;
|
||||||
|
_jobThread.Abort();
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue