[Solved] Cancel a URL::DownloadTask

There seems to not be a way to cancel a URL::DownloadTask once started. I’m downloading a big archive and i should allow the user to stop it if they don’t want it. Any ideas how i could stop the download thread spawned by juce immediately ? I tried raising an exception in the DownloadTask::Listener::progress callback but it seems the juce background thread run method is not catching any exception, so juce thread asserts without having a chance to recover the download task correctly (at least in debug, not sure about release).

Any idea if this could be addressed ?

The docs say that the destructor of the DownloadTask will cancel the download if necessary.

Oh hidy! How could i miss that! Thank you for reporting it.