mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-16 22:18:20 +00:00
Add keepalives for world > login and login > world
This commit is contained in:
@@ -446,7 +446,6 @@ bool LoginServer::Connect()
|
||||
std::placeholders::_2
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
else {
|
||||
client.reset(new EQ::Net::ServertalkClient(LoginServerAddress, LoginServerPort, false, "World", ""));
|
||||
@@ -553,6 +552,8 @@ bool LoginServer::Connect()
|
||||
);
|
||||
}
|
||||
|
||||
m_keepalive.reset(new EQ::Timer(5000, true, std::bind(&LoginServer::OnKeepAlive, this, std::placeholders::_1)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -643,3 +644,9 @@ void LoginServer::SendAccountUpdate(ServerPacket *pack)
|
||||
SendPacket(pack);
|
||||
}
|
||||
}
|
||||
|
||||
void LoginServer::OnKeepAlive(EQ::Timer *t)
|
||||
{
|
||||
ServerPacket pack(ServerOP_KeepAlive, 0);
|
||||
SendPacket(&pack);
|
||||
}
|
||||
Reference in New Issue
Block a user