mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 16:09:35 -05: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
@ -256,12 +256,16 @@ void ftController::run()
|
||||
tickTransfers() ;
|
||||
|
||||
{
|
||||
RsStackMutex stack2(doneMutex);
|
||||
std::list<std::string> files_to_complete ;
|
||||
|
||||
for(std::list<std::string>::iterator it(mDone.begin()); it != mDone.end(); it++)
|
||||
{
|
||||
RsStackMutex stack2(doneMutex);
|
||||
files_to_complete = mDone ;
|
||||
mDone.clear();
|
||||
}
|
||||
|
||||
for(std::list<std::string>::iterator it(files_to_complete.begin()); it != files_to_complete.end(); ++it)
|
||||
completeFile(*it);
|
||||
|
||||
mDone.clear();
|
||||
}
|
||||
|
||||
if(cnt++ % 10 == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user