mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Do call the callback even if it fails
This commit is contained in:
parent
0024a4370c
commit
1839025732
|
@ -84,7 +84,9 @@ void CFetcher::FetcherThread(void *pUser)
|
||||||
if(pTask)
|
if(pTask)
|
||||||
{
|
{
|
||||||
dbg_msg("fetcher", "Task got %s:%s", pTask->m_pUrl, pTask->m_pDest);
|
dbg_msg("fetcher", "Task got %s:%s", pTask->m_pUrl, pTask->m_pDest);
|
||||||
pFetcher->FetchFile(pTask);
|
pFetcher->FetchFile(pTask);
|
||||||
|
if(pTask->m_pfnCompCallback)
|
||||||
|
pTask->m_pfnCompCallback(pTask, pTask->m_pUser);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
thread_sleep(10);
|
thread_sleep(10);
|
||||||
|
@ -137,10 +139,7 @@ void CFetcher::FetchFile(CFetchTask *pTask)
|
||||||
{
|
{
|
||||||
dbg_msg("fetcher", "Task done %s", pTask->m_pDest);
|
dbg_msg("fetcher", "Task done %s", pTask->m_pDest);
|
||||||
pTask->m_State = CFetchTask::STATE_DONE;
|
pTask->m_State = CFetchTask::STATE_DONE;
|
||||||
|
|
||||||
}
|
}
|
||||||
if(pTask->m_pfnCompCallback)
|
|
||||||
pTask->m_pfnCompCallback(pTask, pTask->m_pUser);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFetcher::WriteToFile(char *pData, size_t size, size_t nmemb, void *pFile)
|
void CFetcher::WriteToFile(char *pData, size_t size, size_t nmemb, void *pFile)
|
||||||
|
|
Loading…
Reference in a new issue