Skip to content

Commit

Permalink
qt: PeerTableModel: Fix potential deadlock. #4296
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyholman committed Jun 6, 2014
1 parent 65f78a1 commit b917555
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qt/peertablemodel.cpp
Expand Up @@ -49,8 +49,8 @@ class PeerTablePriv

/** 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
Expand All @@ -70,8 +70,8 @@ class PeerTablePriv
}

// 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)
Expand Down

0 comments on commit b917555

Please sign in to comment.