Skip to content

Commit

Permalink
Merge pull request #3124 from koying/fixplugingetdirlock
Browse files Browse the repository at this point in the history
FIX: avoid waiting forever on a locked CPluginDirectory while exiting
  • Loading branch information
Jim Carroll committed Sep 26, 2013
2 parents 6742497 + fdbdda2 commit 2df043a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions xbmc/Application.cpp
Expand Up @@ -3369,9 +3369,6 @@ void CApplication::Stop(int exitCode)

SaveFileState(true);

// cancel any jobs from the jobmanager
CJobManager::GetInstance().CancelJobs();

g_alarmClock.StopThread();

if( m_bSystemScreenSaverEnable )
Expand All @@ -3394,6 +3391,9 @@ void CApplication::Stop(int exitCode)
m_ExitCode = exitCode;
CLog::Log(LOGNOTICE, "stop all");

// cancel any jobs from the jobmanager
CJobManager::GetInstance().CancelJobs();

// stop scanning before we kill the network and so on
if (m_musicInfoScanner->IsScanning())
m_musicInfoScanner->Stop();
Expand Down
2 changes: 1 addition & 1 deletion xbmc/filesystem/PluginDirectory.cpp
Expand Up @@ -529,7 +529,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, int scri
cancelled = true;
startTime = XbmcThreads::SystemClockMillis();
}
if (cancelled && XbmcThreads::SystemClockMillis() - startTime > timeToKillScript)
if ((cancelled && XbmcThreads::SystemClockMillis() - startTime > timeToKillScript) || g_application.m_bStop)
{ // cancel our script
if (scriptId != -1 && CScriptInvocationManager::Get().IsRunning(scriptId))
{
Expand Down

0 comments on commit 2df043a

Please sign in to comment.