mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -04:00
added mutex to correct data race between bdNodeManager::iteration() and bdnodeManager::incomingMsg()
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3840 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b2b67cfecc
commit
b7badd980f
1 changed files with 5 additions and 1 deletions
|
@ -65,6 +65,7 @@ UdpBitDht::UdpBitDht(UdpPublisher *pub, bdNodeId *id, std::string appVersion, st
|
|||
#endif
|
||||
|
||||
/* setup nodeManager */
|
||||
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
|
||||
mBitDhtManager = new bdNodeManager(id, usedVersion, bootstrapfile, fns);
|
||||
|
||||
}
|
||||
|
@ -208,7 +209,10 @@ void UdpBitDht::run()
|
|||
usleep(TICK_PAUSE_USEC);
|
||||
}
|
||||
|
||||
{
|
||||
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
|
||||
mBitDhtManager->iteration();
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue