fix: Race condition when downloading multiple elements from the content store

This commit is contained in:
WerWolv 2024-03-02 10:57:37 +01:00
parent f1b91ef360
commit bbbf836374

View file

@ -207,7 +207,11 @@ namespace hex::plugin::builtin {
continue;
m_download.wait();
this->handleDownloadFinished(category, entry);
while (m_download.valid()) {
std::this_thread::sleep_for(10ms);
}
task.update(progress);
}
}
@ -369,7 +373,6 @@ namespace hex::plugin::builtin {
log::error("Download failed! HTTP Code {}", response.getStatusCode());
}
m_download = {};
}