diff options
Diffstat (limited to 'src/DeadlockDetect.cpp')
-rw-r--r-- | src/DeadlockDetect.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/DeadlockDetect.cpp b/src/DeadlockDetect.cpp index 322084dc4..f73a45555 100644 --- a/src/DeadlockDetect.cpp +++ b/src/DeadlockDetect.cpp @@ -109,21 +109,24 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age) WorldAges::iterator itr = m_WorldAges.find(a_WorldName); if (itr == m_WorldAges.end()) { - ASSERT(!"Unknown world in cDeadlockDetect"); + SetWorldAge(a_WorldName, a_Age); return; } - if (itr->second.m_Age == a_Age) + + cDeadlockDetect::sWorldAge & WorldAge = itr->second; + + if (WorldAge.m_Age == a_Age) { - itr->second.m_NumCyclesSame += 1; - if (itr->second.m_NumCyclesSame > (1000 * m_IntervalSec) / CYCLE_MILLISECONDS) + WorldAge.m_NumCyclesSame += 1; + if (WorldAge.m_NumCyclesSame > (1000 * m_IntervalSec) / CYCLE_MILLISECONDS) { DeadlockDetected(); } } else { - itr->second.m_Age = a_Age; - itr->second.m_NumCyclesSame = 0; + WorldAge.m_Age = a_Age; + WorldAge.m_NumCyclesSame = 0; } } |