mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
qt: PeerTableModel: Fix potential deadlock. #4296
This commit is contained in:
parent
65f78a111f
commit
b917555b04
@ -49,8 +49,8 @@ public:
|
|||||||
|
|
||||||
/** Pull a full list of peers from vNodes into our cache */
|
/** Pull a full list of peers from vNodes into our cache */
|
||||||
void refreshPeers() {
|
void refreshPeers() {
|
||||||
TRY_LOCK(cs_vNodes, lockNodes);
|
|
||||||
{
|
{
|
||||||
|
TRY_LOCK(cs_vNodes, lockNodes);
|
||||||
if (!lockNodes)
|
if (!lockNodes)
|
||||||
{
|
{
|
||||||
// skip the refresh if we can't immediately get the lock
|
// skip the refresh if we can't immediately get the lock
|
||||||
@ -70,8 +70,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if we can, retrieve the CNodeStateStats for each node.
|
// if we can, retrieve the CNodeStateStats for each node.
|
||||||
TRY_LOCK(cs_main, lockMain);
|
|
||||||
{
|
{
|
||||||
|
TRY_LOCK(cs_main, lockMain);
|
||||||
if (lockMain)
|
if (lockMain)
|
||||||
{
|
{
|
||||||
BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
|
BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
|
||||||
|
Loading…
Reference in New Issue
Block a user