mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[MySQL] Add keepalives to UCS and Loginserver (#2953)
This commit is contained in:
parent
d6c6b78d8a
commit
ce1472db1e
@ -288,9 +288,16 @@ int main(int argc, char **argv)
|
||||
LogInfo("[Config] [Security] IsPasswordLoginAllowed [{0}]", server.options.IsPasswordLoginAllowed());
|
||||
LogInfo("[Config] [Security] IsUpdatingInsecurePasswords [{0}]", server.options.IsUpdatingInsecurePasswords());
|
||||
|
||||
Timer keepalive(INTERSERVER_TIMER); // does auto-reconnect
|
||||
|
||||
auto loop_fn = [&](EQ::Timer* t) {
|
||||
Timer::SetCurrentTime();
|
||||
|
||||
if (keepalive.Check()) {
|
||||
keepalive.Start();
|
||||
server.db->ping();
|
||||
}
|
||||
|
||||
if (!run_server) {
|
||||
EQ::EventLoop::Get().Shutdown();
|
||||
return;
|
||||
|
||||
@ -114,7 +114,7 @@ int main() {
|
||||
Timer ChannelListProcessTimer(60000);
|
||||
Timer ClientConnectionPruneTimer(60000);
|
||||
|
||||
Timer InterserverTimer(INTERSERVER_TIMER); // does auto-reconnect
|
||||
Timer keepalive(INTERSERVER_TIMER); // does auto-reconnect
|
||||
|
||||
LogInfo("Starting EQEmu Universal Chat Server");
|
||||
|
||||
@ -188,6 +188,10 @@ int main() {
|
||||
// crash_test.detach();
|
||||
|
||||
auto loop_fn = [&](EQ::Timer* t) {
|
||||
if (keepalive.Check()) {
|
||||
keepalive.Start();
|
||||
database.ping();
|
||||
}
|
||||
|
||||
Timer::SetCurrentTime();
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user