Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "changed: stop unloading libcurl without stopping closing of h…

…ttp sessions completely"

This reverts commit bcbe164.
  • Loading branch information...
commit 30d5551e32d522079a28c8e01790cbb91344eb31 1 parent de6d01a
Jonathan Marshall authored
Showing with 12 additions and 7 deletions.
  1. +12 −7 xbmc/filesystem/DllLibCurl.cpp
View
19 xbmc/filesystem/DllLibCurl.cpp
@@ -39,7 +39,7 @@ bool DllLibCurlGlobal::Load()
CSingleLock lock(m_critSection);
if(g_curlReferences > 0)
{
- g_curlReferences++;
+ //g_curlReferences++;
return true;
}
@@ -56,13 +56,16 @@ bool DllLibCurlGlobal::Load()
}
/* check idle will clean up the last one */
- g_curlReferences = 2;
+ //g_curlReferences = 2;
+ g_curlReferences = 1;
return true;
}
void DllLibCurlGlobal::Unload()
{
+ return;
+ /*
CSingleLock lock(m_critSection);
if (--g_curlReferences == 0)
{
@@ -75,19 +78,22 @@ void DllLibCurlGlobal::Unload()
DllDynamic::Unload();
}
- /* CheckIdle will clear this one up */
+ // CheckIdle will clear this one up
if(g_curlReferences == 1)
g_curlTimeout = XbmcThreads::SystemClockMillis();
+ */
}
void DllLibCurlGlobal::CheckIdle()
{
/* avoid locking section here, to avoid stalling gfx thread on loads*/
+ return;
+ /*
if(g_curlReferences == 0)
return;
CSingleLock lock(m_critSection);
- /* 20 seconds idle time before closing handle */
+ // 20 seconds idle time before closing handle
const unsigned int idletime = 30000;
VEC_CURLSESSIONS::iterator it = m_sessions.begin();
@@ -112,11 +118,10 @@ void DllLibCurlGlobal::CheckIdle()
it++;
}
- /* check if we should unload the dll */
-#if(0) // we never unload libcurl, since libssl can break when python unloads then
+ // check if we should unload the dll
if(g_curlReferences == 1 && XbmcThreads::SystemClockMillis() - g_curlTimeout > idletime)
Unload();
-#endif
+ */
}
void DllLibCurlGlobal::easy_aquire(const char *protocol, const char *hostname, CURL_HANDLE** easy_handle, CURLM** multi_handle)
Please sign in to comment.
Something went wrong with that request. Please try again.