mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-15 21:06:20 -04:00
Removing items from job queue is now done while a lock is acquired.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
//https://github.com/kayone/NzbDrone/blob/master/NzbDrone.Core/Providers/Jobs/JobProvider.cs
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
@@ -201,6 +202,7 @@ namespace NzbDrone.Core.Providers.Jobs
|
||||
if (Queue.Count != 0)
|
||||
{
|
||||
job = Queue.First();
|
||||
Queue.Remove(job);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,13 +216,6 @@ namespace NzbDrone.Core.Providers.Jobs
|
||||
{
|
||||
Logger.FatalException("An error has occurred while processing queued job.", e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (job != null)
|
||||
{
|
||||
Queue.Remove(job);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} while (Queue.Count != 0);
|
||||
|
||||
Reference in New Issue
Block a user