aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2019-10-26 19:47:48 +0200
committerShauren <shauren.trinity@gmail.com>2021-12-18 23:24:24 +0100
commit0fb1bf8439e29d283ff30b32c3df0bbdbdbdc543 (patch)
tree48ba6a214a1c0421fae90f5b5fa4385b0fefe4b1
parente071f08ca72185d5bbbe07439db25d6932b62e77 (diff)
Core/Misc: Enable MaxCoreStuckTime setting by default
Enable MaxCoreStuckTime setting by default to force worldserver to exit in case of infinite loops. Note that this will not affect existing setups with the setting MaxCoreStuckTime set to 0 in the local worldserver.conf . (cherry picked from commit 00703ee238729a8d5b3d17edf8dc16d6c6c6b601)
-rw-r--r--src/server/worldserver/Main.cpp2
-rw-r--r--src/server/worldserver/worldserver.conf.dist6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp
index c24d60eef54..a5dcf4ac525 100644
--- a/src/server/worldserver/Main.cpp
+++ b/src/server/worldserver/Main.cpp
@@ -327,7 +327,7 @@ extern int main(int argc, char** argv)
// Start the freeze check callback cycle in 5 seconds (cycle itself is 1 sec)
std::shared_ptr<FreezeDetector> freezeDetector;
- if (int coreStuckTime = sConfigMgr->GetIntDefault("MaxCoreStuckTime", 0))
+ if (int coreStuckTime = sConfigMgr->GetIntDefault("MaxCoreStuckTime", 60))
{
freezeDetector = std::make_shared<FreezeDetector>(*ioContext, coreStuckTime * 1000);
FreezeDetector::Start(freezeDetector);
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 593018d4c6b..ed70b69d01d 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -475,10 +475,10 @@ LogDB.Opt.ClearTime = 1209600
#
# MaxCoreStuckTime
# Description: Time (in seconds) before the server is forced to crash if it is frozen.
-# Default: 0 - (Disabled)
-# 10+ - (Enabled, Recommended 10+)
+# Default: 60 - (Enabled, Recommended 10+)
+# 0 - (Disabled)
-MaxCoreStuckTime = 0
+MaxCoreStuckTime = 60
#
# AddonChannel