mirror of https://github.com/axmolengine/axmol.git
Issue #9061: Fix no success notification for empty download queue issue
This commit is contained in:
parent
ead867559c
commit
e167f0889b
|
@ -471,13 +471,11 @@ void Downloader::batchDownloadAsync(const DownloadUnits &units, const std::strin
|
|||
|
||||
void Downloader::batchDownloadSync(const DownloadUnits &units, const std::string &batchId/* = ""*/)
|
||||
{
|
||||
if (units.size() == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Make sure downloader won't be released
|
||||
std::weak_ptr<Downloader> ptr = shared_from_this();
|
||||
|
||||
if (units.size() != 0)
|
||||
{
|
||||
// Test server download resuming support with the first unit
|
||||
_supportResuming = false;
|
||||
CURL *header = curl_easy_init();
|
||||
|
@ -512,6 +510,7 @@ void Downloader::batchDownloadSync(const DownloadUnits &units, const std::string
|
|||
{
|
||||
groupBatchDownload(group);
|
||||
}
|
||||
}
|
||||
|
||||
Director::getInstance()->getScheduler()->performFunctionInCocosThread([ptr, batchId]{
|
||||
if (!ptr.expired()) {
|
||||
|
|
Loading…
Reference in New Issue