fixed possible bug due to misplaced mutex (Reported by bNK)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5318 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-07-20 21:42:16 +00:00
parent ee77ec8c6c
commit 616825ec4b

View File

@ -300,10 +300,11 @@ void p3BandwidthControl::statusChange(const std::list<pqipeer> &plist)
{
if (it->state & RS_PEER_S_FRIEND)
{
RsStackMutex stack(mBwMtx); /****** LOCKED MUTEX *******/
if (it->actions & RS_PEER_DISCONNECTED)
{
/* remove from map */
RsStackMutex stack(mBwMtx); /****** LOCKED MUTEX *******/
std::map<std::string, BwCtrlData>::iterator bit;
bit = mBwMap.find(it->id);
if (bit == mBwMap.end())