diff --git a/Source/LibationUiBase/ProcessQueue/ProcessQueueViewModel.cs b/Source/LibationUiBase/ProcessQueue/ProcessQueueViewModel.cs index 1a877acc..7ebdc321 100644 --- a/Source/LibationUiBase/ProcessQueue/ProcessQueueViewModel.cs +++ b/Source/LibationUiBase/ProcessQueue/ProcessQueueViewModel.cs @@ -102,8 +102,9 @@ public class ProcessQueueViewModel : ReactiveObject : 0; config.DownloadSpeedLimit = (long)(_speedLimit * 1024 * 1024); - // Apply to all currently active books - foreach (var activeBook in Queue.Active.OfType()) + // Apply to all currently active books. Over a copy: the speed limit is changed from the UI + // thread while book tasks start and finish, and Active is the live list. + foreach (var activeBook in Queue.GetActive().OfType()) activeBook.Configuration.DownloadSpeedLimit = config.DownloadSpeedLimit; SpeedLimitIncrement = _speedLimit > 100 ? 10