fix m_FinishedRequests not being cleared on Abort()

This commit is contained in:
Glenn Maynard
2004-11-06 03:21:19 +00:00
parent 2c314df898
commit c8a252ee77
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -206,7 +206,7 @@ bool BackgroundLoader::IsCacheFileFinished( const CString &sFile, CString &sActu
return true;
}
void BackgroundLoader::FinishedWithCachedFile( const CString &sFile )
void BackgroundLoader::FinishedWithCachedFile( CString sFile )
{
if( !g_bEnableBackgroundLoading )
return;
@@ -238,6 +238,10 @@ void BackgroundLoader::Abort()
while( !GetRequest().empty() )
;
/* Clear any previously finished requests. */
while( m_FinishedRequests.size() )
FinishedWithCachedFile( m_FinishedRequests.begin()->first );
/* Tell the thread to abort any request it's handling now. */
if( m_sThreadIsActive )
m_sThreadShouldAbort = true;