Skip to content

Commit

Permalink
[Qt] Add TRY_LOCK back to peertablemodel
Browse files Browse the repository at this point in the history
  • Loading branch information
cozz committed Aug 10, 2014
1 parent 36065cc commit 9297763
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/qt/peertablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,14 @@ class PeerTablePriv
}

// Try to retrieve the CNodeStateStats for each node.
BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
stats.fNodeStateStatsAvailable = GetNodeStateStats(stats.nodeStats.nodeid, stats.nodeStateStats);
{
TRY_LOCK(cs_main, lockMain);
if (lockMain)
{
BOOST_FOREACH(CNodeCombinedStats &stats, cachedNodeStats)
stats.fNodeStateStatsAvailable = GetNodeStateStats(stats.nodeStats.nodeid, stats.nodeStateStats);
}
}

if (sortColumn >= 0)
// sort cacheNodeStats (use stable sort to prevent rows jumping around unneceesarily)
Expand Down

0 comments on commit 9297763

Please sign in to comment.