only recreate the lazy when needed

pull/4242/head
Gary Wilber 4 years ago
parent 26a05e6974
commit 74f211960a

@ -108,7 +108,10 @@ namespace MediaBrowser.Controller.BaseItemManager
/// </summary> /// </summary>
private void SetupMetadataThrottler() private void SetupMetadataThrottler()
{ {
MetadataRefreshThrottler = new Lazy<SemaphoreSlim>(() => new SemaphoreSlim(_metadataRefreshConcurrency)); if (MetadataRefreshThrottler == null || MetadataRefreshThrottler.IsValueCreated)
{
MetadataRefreshThrottler = new Lazy<SemaphoreSlim>(() => new SemaphoreSlim(_metadataRefreshConcurrency));
}
} }
/// <summary> /// <summary>

Loading…
Cancel
Save