Merge pull request #1117 from flowln/fix_updater

Fix the mod updater not working as intended
This commit is contained in:
timoreo 2022-09-08 09:28:05 +02:00 committed by GitHub
commit ca282f9fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,8 @@ void ConcurrentTask::executeTask()
{
m_total_size = m_queue.size();
int num_starts = std::min(m_total_max_size, m_total_size);
// Start the least amount of tasks needed, but at least one
int num_starts = std::max(1, std::min(m_total_max_size, m_total_size));
for (int i = 0; i < num_starts; i++) {
QMetaObject::invokeMethod(this, &ConcurrentTask::startNext, Qt::QueuedConnection);
}