diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-07-29 12:00:41 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-29 12:00:41 -0400 |
| commit | 43000d269b1871e985a561b817410a5399d23b65 (patch) | |
| tree | 098a1ea26c933261f6b4d0b68d06dc576ae61e77 /MediaBrowser.Api/ApiEntryPoint.cs | |
| parent | 100236f416e1917d57913f117b7f0c4ee9069d0b (diff) | |
| parent | 9f12df23ab02e4b44467ef7a948fcc69df9e4d62 (diff) | |
Merge pull request #1996 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.Api/ApiEntryPoint.cs')
| -rw-r--r-- | MediaBrowser.Api/ApiEntryPoint.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index dc811812a..87fa3d46c 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -126,9 +126,10 @@ namespace MediaBrowser.Api /// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected virtual void Dispose(bool dispose) { - var jobCount = _activeTranscodingJobs.Count; + var list = _activeTranscodingJobs.ToList(); + var jobCount = list.Count; - Parallel.ForEach(_activeTranscodingJobs.ToList(), j => KillTranscodingJob(j, false, path => true)); + Parallel.ForEach(list, j => KillTranscodingJob(j, false, path => true)); // Try to allow for some time to kill the ffmpeg processes and delete the partial stream files if (jobCount > 0) |
