[Server] Tweak inter process keepalive timers; this is a very tiny overhead for inter-process chatter to check for connection liveness (#1502)

This commit is contained in:
Chris Miles 2021-08-31 00:34:28 -05:00 committed by GitHub
parent 06890f695a
commit 3b01608a71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ WorldServer::WorldServer(std::shared_ptr<EQ::Net::ServertalkServerConnection> wo
std::bind(&WorldServer::ProcessLSAccountUpdate, this, std::placeholders::_1, std::placeholders::_2) std::bind(&WorldServer::ProcessLSAccountUpdate, this, std::placeholders::_1, std::placeholders::_2)
); );
m_keepalive = std::make_unique<EQ::Timer>(5000, true, std::bind(&WorldServer::OnKeepAlive, this, std::placeholders::_1)); m_keepalive = std::make_unique<EQ::Timer>(1000, true, std::bind(&WorldServer::OnKeepAlive, this, std::placeholders::_1));
} }
WorldServer::~WorldServer() = default; WorldServer::~WorldServer() = default;

View File

@ -552,7 +552,7 @@ bool LoginServer::Connect()
); );
} }
m_keepalive = std::make_unique<EQ::Timer>(5000, true, std::bind(&LoginServer::OnKeepAlive, this, std::placeholders::_1)); m_keepalive = std::make_unique<EQ::Timer>(1000, true, std::bind(&LoginServer::OnKeepAlive, this, std::placeholders::_1));
return true; return true;
} }

View File

@ -43,7 +43,7 @@ ZSList::ZSList()
memset(pLockedZones, 0, sizeof(pLockedZones)); memset(pLockedZones, 0, sizeof(pLockedZones));
m_tick = std::make_unique<EQ::Timer>(5000, true, std::bind(&ZSList::OnTick, this, std::placeholders::_1)); m_tick = std::make_unique<EQ::Timer>(5000, true, std::bind(&ZSList::OnTick, this, std::placeholders::_1));
m_keepalive = std::make_unique<EQ::Timer>(2500, true, std::bind(&ZSList::OnKeepAlive, this, std::placeholders::_1)); m_keepalive = std::make_unique<EQ::Timer>(1500, true, std::bind(&ZSList::OnKeepAlive, this, std::placeholders::_1));
} }
ZSList::~ZSList() { ZSList::~ZSList() {

View File

@ -86,7 +86,7 @@ void WorldServer::Connect()
m_connection->OnMessage(std::bind(&WorldServer::HandleMessage, this, std::placeholders::_1, std::placeholders::_2)); m_connection->OnMessage(std::bind(&WorldServer::HandleMessage, this, std::placeholders::_1, std::placeholders::_2));
m_keepalive = std::make_unique<EQ::Timer>(2500, true, std::bind(&WorldServer::OnKeepAlive, this, std::placeholders::_1)); m_keepalive = std::make_unique<EQ::Timer>(1000, true, std::bind(&WorldServer::OnKeepAlive, this, std::placeholders::_1));
} }
bool WorldServer::SendPacket(ServerPacket *pack) bool WorldServer::SendPacket(ServerPacket *pack)