Skip to content

Commit

Permalink
Merge pull request #601 from cswetenham/master
Browse files Browse the repository at this point in the history
Copy downloads before iterating, since they may be modified concurrently
  • Loading branch information
AlexanderDzhoganov committed Dec 16, 2014
2 parents 6215958 + 28c78d8 commit 74ede88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CKAN/CKAN/Net/NetAsyncDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private void FileProgressReport(int index, int percent, long bytesDownloaded, lo
long totalBytesLeft = 0;
long totalBytesDownloaded = 0;

foreach (NetAsyncDownloaderDownloadPart t in downloads)
foreach (NetAsyncDownloaderDownloadPart t in downloads.ToList())
{
if (t.bytesLeft > 0)
{
Expand Down

0 comments on commit 74ede88

Please sign in to comment.