fixed bug in mutexes causing a deadlock in gxs integrity check

This commit is contained in:
csoler 2020-12-08 23:45:31 +01:00
parent 8f5656433a
commit ed5f8618b6

View File

@ -299,12 +299,13 @@ void RsGenExchange::tick()
if(mIntegrityCheck->isDone())
{
RS_STACK_MUTEX(mGenMtx) ;
std::vector<RsGxsGroupId> grpIds;
GxsMsgReq msgIds;
mIntegrityCheck->getDeletedIds(grpIds, msgIds);
{
RS_STACK_MUTEX(mGenMtx) ;
mIntegrityCheck->getDeletedIds(grpIds, msgIds);
}
if(!msgIds.empty())
{
@ -319,9 +320,12 @@ void RsGenExchange::tick()
deleteGroup(token2,grpId);
}
delete mIntegrityCheck;
mIntegrityCheck = NULL;
mChecking = false;
{
RS_STACK_MUTEX(mGenMtx) ;
delete mIntegrityCheck;
mIntegrityCheck = NULL;
mChecking = false;
}
}
}
}