Skip to content

Commit

Permalink
fix: Content store downloads getting stuck sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Jun 27, 2024
1 parent 301e8c5 commit 8672a2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/builtin/source/content/views/view_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,13 @@ namespace hex::plugin::builtin {

m_download.wait();

while (m_download.wait_for(100ms) != std::future_status::ready) {
while (m_download.valid() && m_download.wait_for(100ms) != std::future_status::ready) {
task.update();
}

entry.hasUpdate = false;
entry.downloading = false;

task.increment();
}
}
Expand Down Expand Up @@ -324,7 +327,7 @@ namespace hex::plugin::builtin {
return false;
}

return true;
return downloading;
}

bool ViewStore::remove(const paths::impl::DefaultPath *pathType, const std::string &fileName) {
Expand Down

0 comments on commit 8672a2c

Please sign in to comment.