From 59c8ffe4b3fec5979926d991c17cae84b41e46e2 Mon Sep 17 00:00:00 2001 From: leak Date: Sun, 6 Jul 2014 23:04:38 +0200 Subject: Change the freeze detector thread to be a periodic callback running on the thread pool --- src/server/authserver/Main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/server/authserver/Main.cpp') diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index c7f71edbd0c..39ad4b60dfe 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -137,7 +137,7 @@ int main(int argc, char** argv) // Enabled a timed callback for handling the database keep alive ping _dbPingInterval = sConfigMgr->GetIntDefault("MaxPingTime", 30); - _dbPingTimer.expires_from_now(boost::posix_time::seconds(_dbPingInterval)); + _dbPingTimer.expires_from_now(boost::posix_time::minutes(_dbPingInterval)); _dbPingTimer.async_wait(KeepDatabaseAliveHandler); // Start the io service worker loop @@ -218,6 +218,7 @@ void KeepDatabaseAliveHandler(const boost::system::error_code& error) LoginDatabase.KeepAlive(); _dbPingTimer.expires_from_now(boost::posix_time::minutes(_dbPingInterval)); + _dbPingTimer.async_wait(KeepDatabaseAliveHandler); } } -- cgit v1.2.3