Fixed: cURL multi/easy handle cleanup
--HG-- branch : develop
This commit is contained in:
parent
f5928305fe
commit
ccb2cbfa78
1 changed files with 21 additions and 2 deletions
|
@ -698,6 +698,8 @@ namespace NLGUI
|
||||||
}
|
}
|
||||||
requestTerminated();
|
requestTerminated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (vector<CDataDownload>::iterator it=Curls.begin(); it<Curls.end(); it++)
|
for (vector<CDataDownload>::iterator it=Curls.begin(); it<Curls.end(); it++)
|
||||||
|
@ -871,8 +873,20 @@ namespace NLGUI
|
||||||
#ifdef LOG_DL
|
#ifdef LOG_DL
|
||||||
nlwarning("Release Downloads");
|
nlwarning("Release Downloads");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// remove all queued and already started downloads
|
||||||
|
for (uint i = 0; i < Curls.size(); ++i)
|
||||||
|
{
|
||||||
|
if (Curls[i].data)
|
||||||
|
{
|
||||||
if (MultiCurl)
|
if (MultiCurl)
|
||||||
curl_multi_cleanup(MultiCurl);
|
curl_multi_remove_handle(MultiCurl, Curls[i].data->Request);
|
||||||
|
|
||||||
|
// release CCurlWWWData
|
||||||
|
delete Curls[i].data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Curls.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
class CGroupListAdaptor : public CInterfaceGroup
|
class CGroupListAdaptor : public CInterfaceGroup
|
||||||
|
@ -3059,8 +3073,13 @@ namespace NLGUI
|
||||||
// this is why the call to 'updateRefreshButton' has been removed from stopBrowse
|
// this is why the call to 'updateRefreshButton' has been removed from stopBrowse
|
||||||
|
|
||||||
clearContext();
|
clearContext();
|
||||||
|
releaseDownloads();
|
||||||
|
|
||||||
if (_CurlWWW)
|
if (_CurlWWW)
|
||||||
delete _CurlWWW;
|
delete _CurlWWW;
|
||||||
|
|
||||||
|
if(MultiCurl)
|
||||||
|
curl_multi_cleanup(MultiCurl);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CGroupHTML::getProperty( const std::string &name ) const
|
std::string CGroupHTML::getProperty( const std::string &name ) const
|
||||||
|
|
Loading…
Reference in a new issue