mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
removed potential cross-lock situation (reported by Valgrind)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3855 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
34a3fc4ea8
commit
d83a7118fa
@ -255,15 +255,19 @@ void ftController::run()
|
|||||||
|
|
||||||
tickTransfers() ;
|
tickTransfers() ;
|
||||||
|
|
||||||
|
{
|
||||||
|
std::list<std::string> files_to_complete ;
|
||||||
|
|
||||||
{
|
{
|
||||||
RsStackMutex stack2(doneMutex);
|
RsStackMutex stack2(doneMutex);
|
||||||
|
files_to_complete = mDone ;
|
||||||
for(std::list<std::string>::iterator it(mDone.begin()); it != mDone.end(); it++)
|
|
||||||
completeFile(*it);
|
|
||||||
|
|
||||||
mDone.clear();
|
mDone.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(std::list<std::string>::iterator it(files_to_complete.begin()); it != files_to_complete.end(); ++it)
|
||||||
|
completeFile(*it);
|
||||||
|
}
|
||||||
|
|
||||||
if(cnt++ % 10 == 0)
|
if(cnt++ % 10 == 0)
|
||||||
checkDownloadQueue() ;
|
checkDownloadQueue() ;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user