mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 05:23:01 +01:00
Do not hold cs_vNodes in CSigSharesManager::SendMessages() for too long (#2758)
This commit is contained in:
parent
fbf0dcb086
commit
3a5e7c4334
@ -1059,7 +1059,9 @@ bool CSigSharesManager::SendMessages()
|
|||||||
|
|
||||||
bool didSend = false;
|
bool didSend = false;
|
||||||
|
|
||||||
g_connman->ForEachNode([&](CNode* pnode) {
|
std::vector<CNode*> vNodesCopy = g_connman->CopyNodeVector(CConnman::FullyConnectedOnly);
|
||||||
|
|
||||||
|
for (auto& pnode : vNodesCopy) {
|
||||||
CNetMsgMaker msgMaker(pnode->GetSendVersion());
|
CNetMsgMaker msgMaker(pnode->GetSendVersion());
|
||||||
|
|
||||||
auto it1 = sigSessionAnnouncements.find(pnode->id);
|
auto it1 = sigSessionAnnouncements.find(pnode->id);
|
||||||
@ -1145,9 +1147,10 @@ bool CSigSharesManager::SendMessages()
|
|||||||
didSend = true;
|
didSend = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
// looped through all nodes, release them
|
||||||
});
|
g_connman->ReleaseNodeVector(vNodesCopy);
|
||||||
|
|
||||||
if (didSend) {
|
if (didSend) {
|
||||||
g_connman->WakeSelect();
|
g_connman->WakeSelect();
|
||||||
|
Loading…
Reference in New Issue
Block a user