mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 15:28:28 -05: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
@ -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);
|
||||
}
|
||||
|
||||
mBitDhtManager->iteration();
|
||||
{
|
||||
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
|
||||
mBitDhtManager->iteration();
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user