Skip to content

Commit

Permalink
Fix shutdown issue
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyschoen committed Dec 3, 2024
1 parent f78e4cf commit 3e93be7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Source/Dialogs/PatchStore.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <random>


class DownloadPool
class DownloadPool : public DeletedAtShutdown
{
public:
struct DownloadListener
Expand All @@ -11,6 +11,13 @@ class DownloadPool
virtual void imageDownloadCompleted(hash32 hash, Image const& image) {};
};

~DownloadPool()
{
imagePool.removeAllJobs(true, -1);
patchPool.removeAllJobs(true, -1);
clearSingletonInstance();
}

void addDownloadListener(DownloadListener* listener)
{
listeners.insert(listener);
Expand Down

0 comments on commit 3e93be7

Please sign in to comment.