UCS / Raid / Zone Fixes (#1033)

* Cache EntityList::GetRaidByClient

* Adjustments [skip ci]

* Update entity [skip ci]

* More cleanup [skip ci]

* More tweaks [skip ci]

* Cleanup [skip ci]

* Fix bugs with UCS reconnection on crash / exit, not adding soft deleted characters, put main loop on UV lib

* Reduce log spam that should be debugging; send keepalives to clients so that they properly prune from the connection list

* Shutdown the eventloop to properly shutdown the zone versus calling a hard exit
This commit is contained in:
Chris Miles
2020-04-14 23:28:43 -05:00
committed by GitHub
parent bffeee8d1a
commit 16cfad1966
14 changed files with 146 additions and 69 deletions
+16 -8
View File
@@ -70,17 +70,18 @@ int main() {
// Check every minute for unused channels we can delete
//
Timer ChannelListProcessTimer(60000);
Timer ClientConnectionPruneTimer(60000);
Timer InterserverTimer(INTERSERVER_TIMER); // does auto-reconnect
LogInfo("Starting EQEmu Universal Chat Server");
if (!ucsconfig::LoadConfig()) {
LogInfo("Loading server configuration failed");
if (!ucsconfig::LoadConfig()) {
LogInfo("Loading server configuration failed");
return 1;
}
Config = ucsconfig::get();
Config = ucsconfig::get();
WorldShortName = Config->ShortName;
@@ -144,19 +145,26 @@ int main() {
worldserver = new WorldServer;
while(RunLoops) {
auto loop_fn = [&](EQ::Timer* t) {
Timer::SetCurrentTime();
g_Clientlist->Process();
if(ChannelListProcessTimer.Check())
if (ChannelListProcessTimer.Check()) {
ChannelList->Process();
}
EQ::EventLoop::Get().Process();
if (ClientConnectionPruneTimer.Check()) {
g_Clientlist->CheckForStaleConnectionsAll();
}
Sleep(5);
}
};
EQ::Timer process_timer(loop_fn);
process_timer.Start(32, true);
EQ::EventLoop::Get().Run();
ChannelList->RemoveAllChannels();