From 5f45307a78d4eb0c3991b3e1a72e80bb986f6ec4 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sat, 12 May 2018 19:28:32 +0200 Subject: [PATCH] Core/Misc: Fix FreezeDetector triggered on startup Fix FreezeDetector triggering the assert on startup if scripts took more than a few seconds to initialize. --- src/server/worldserver/Main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/worldserver/Main.cpp b/src/server/worldserver/Main.cpp index 99d074bd6f9..b4eee978873 100644 --- a/src/server/worldserver/Main.cpp +++ b/src/server/worldserver/Main.cpp @@ -91,7 +91,7 @@ class FreezeDetector { public: FreezeDetector(Trinity::Asio::IoContext& ioContext, uint32 maxCoreStuckTime) - : _timer(ioContext), _worldLoopCounter(0), _lastChangeMsTime(0), _maxCoreStuckTimeInMs(maxCoreStuckTime) { } + : _timer(ioContext), _worldLoopCounter(0), _lastChangeMsTime(getMSTime()), _maxCoreStuckTimeInMs(maxCoreStuckTime) { } static void Start(std::shared_ptr const& freezeDetector) {