From d18f5bdb682a1d9c6e3a191926bfd46d36e813c1 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Wed, 17 Apr 2013 13:22:58 -0700 Subject: Force timers to be managed --- src/login/login.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/login') diff --git a/src/login/login.cpp b/src/login/login.cpp index 583cff9..fea673e 100644 --- a/src/login/login.cpp +++ b/src/login/login.cpp @@ -4273,18 +4273,26 @@ int do_init(int argc, char **argv) login_fd = make_listen_port(login_port); - add_timer_interval(gettick() + std::chrono::minutes(5), check_auth_sync, std::chrono::minutes(5)); + Timer(gettick() + std::chrono::minutes(5), + check_auth_sync, + std::chrono::minutes(5) + ).detach(); if (anti_freeze_enable > 0) { - add_timer_interval(gettick() + std::chrono::seconds(1), char_anti_freeze_system, ANTI_FREEZE_INTERVAL); + Timer(gettick() + std::chrono::seconds(1), + char_anti_freeze_system, + ANTI_FREEZE_INTERVAL + ).detach(); } // add timer to check GM accounts file modification std::chrono::seconds j = gm_account_filename_check_timer; if (j == interval_t::zero()) j = std::chrono::minutes(1); - add_timer_interval(gettick() + j, check_GM_file, j); + Timer(gettick() + j, + check_GM_file, + j).detach(); LOGIN_LOG("The login-server is ready (Server is listening on the port %d).\n", login_port); -- cgit v1.2.3-70-g09d2