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;
{
RS_STACK_MUTEX(mGenMtx) ;
mIntegrityCheck->getDeletedIds(grpIds, msgIds);
}
if(!msgIds.empty())
{
@ -319,12 +320,15 @@ void RsGenExchange::tick()
deleteGroup(token2,grpId);
}
{
RS_STACK_MUTEX(mGenMtx) ;
delete mIntegrityCheck;
mIntegrityCheck = NULL;
mChecking = false;
}
}
}
}
bool RsGenExchange::messagePublicationTest(const RsGxsMsgMetaData& meta)
{