summaryrefslogtreecommitdiffstats
path: root/src/DeadlockDetect.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2017-01-17 14:10:02 +0100
committerMattes D <github@xoft.cz>2017-01-17 18:35:12 +0100
commita52de8e8cd67259e328f4a30b12916169406718b (patch)
tree18e617b9428afa6f4f0e3fa5958c703a275629bb /src/DeadlockDetect.cpp
parentUpdated Github label links (#3543) (diff)
downloadcuberite-a52de8e8cd67259e328f4a30b12916169406718b.tar
cuberite-a52de8e8cd67259e328f4a30b12916169406718b.tar.gz
cuberite-a52de8e8cd67259e328f4a30b12916169406718b.tar.bz2
cuberite-a52de8e8cd67259e328f4a30b12916169406718b.tar.lz
cuberite-a52de8e8cd67259e328f4a30b12916169406718b.tar.xz
cuberite-a52de8e8cd67259e328f4a30b12916169406718b.tar.zst
cuberite-a52de8e8cd67259e328f4a30b12916169406718b.zip
Diffstat (limited to 'src/DeadlockDetect.cpp')
-rw-r--r--src/DeadlockDetect.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/DeadlockDetect.cpp b/src/DeadlockDetect.cpp
index 3141020d0..525dc8118 100644
--- a/src/DeadlockDetect.cpp
+++ b/src/DeadlockDetect.cpp
@@ -121,7 +121,7 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age)
WorldAge.m_NumCyclesSame += 1;
if (WorldAge.m_NumCyclesSame > (m_IntervalSec * 1000) / CYCLE_MILLISECONDS)
{
- DeadlockDetected();
+ DeadlockDetected(a_WorldName, a_Age);
}
}
else
@@ -135,9 +135,11 @@ void cDeadlockDetect::CheckWorldAge(const AString & a_WorldName, Int64 a_Age)
-void cDeadlockDetect::DeadlockDetected(void)
+void cDeadlockDetect::DeadlockDetected(const AString & a_WorldName, Int64 a_WorldAge)
{
- LOGERROR("Deadlock detected, aborting the server");
+ LOGERROR("Deadlock detected: world %s has been stuck at age %lld. Aborting the server.",
+ a_WorldName.c_str(), static_cast<long long>(a_WorldAge)
+ );
ASSERT(!"Deadlock detected");
abort();
}