mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-13 16:48:08 +00:00
Merge pull request #4297
b917555
qt: PeerTableModel: Fix potential deadlock. #4296 (Ashley Holman)
This commit is contained in:
commit
345cb52e8b
@ -49,8 +49,8 @@ public:
|
||||
|
||||
/** Pull a full list of peers from vNodes into our cache */
|
||||
void refreshPeers() {
|
||||
TRY_LOCK(cs_vNodes, lockNodes);
|
||||
{
|
||||
TRY_LOCK(cs_vNodes, lockNodes);
|
||||
if (!lockNodes)
|
||||
{
|
||||
// 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.
|
||||
TRY_LOCK(cs_main, lockMain);
|
||||
{
|
||||
TRY_LOCK(cs_main, lockMain);
|
||||
if (lockMain)
|
||||
{
|
||||
BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
|
||||
|
Loading…
Reference in New Issue
Block a user