From 333a88ebd176adf7ddc3068626de08adc9192fb1 Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Mon, 4 Mar 2013 21:55:36 -0800 Subject: [PATCH] added locking to RssSyncJob --- NzbDrone.Core/Jobs/Implementations/RssSyncJob.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/NzbDrone.Core/Jobs/Implementations/RssSyncJob.cs b/NzbDrone.Core/Jobs/Implementations/RssSyncJob.cs index 5a69d2ed0..9a0de861b 100644 --- a/NzbDrone.Core/Jobs/Implementations/RssSyncJob.cs +++ b/NzbDrone.Core/Jobs/Implementations/RssSyncJob.cs @@ -25,7 +25,7 @@ namespace NzbDrone.Core.Jobs.Implementations private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); public RssSyncJob(DownloadProvider downloadProvider, IIndexerService indexerService, - MonitoredEpisodeSpecification isMonitoredEpisodeSpecification, AllowedDownloadSpecification allowedDownloadSpecification, + MonitoredEpisodeSpecification isMonitoredEpisodeSpecification, AllowedDownloadSpecification allowedDownloadSpecification, UpgradeHistorySpecification upgradeHistorySpecification, IConfigService configService) { _downloadProvider = downloadProvider; @@ -56,7 +56,11 @@ namespace NzbDrone.Core.Jobs.Implementations { try { - reports.AddRange(indexer.FetchRss()); + var parseResults = indexer.FetchRss(); + lock (reports) + { + reports.AddRange(parseResults); + } } catch (Exception e) {