mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-15 08:48:22 +00:00
[Code] UCSConnection Global to Singleton Cleanup (#4937)
Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
+7
-3
@@ -94,7 +94,11 @@
|
||||
ClientList client_list;
|
||||
GroupLFPList LFPGroupList;
|
||||
ZSList zoneserver_list;
|
||||
<<<<<<< kinglykrab/ucsconnection-global-to-singleton
|
||||
LoginServerList loginserverlist;
|
||||
=======
|
||||
UCSConnection UCSLink;
|
||||
>>>>>>> master
|
||||
QueryServConnection QSLink;
|
||||
LauncherList launcher_list;
|
||||
AdventureManager adventure_manager;
|
||||
@@ -296,7 +300,7 @@ int main(int argc, char **argv)
|
||||
connection->GetUUID()
|
||||
);
|
||||
|
||||
UCSLink.SetConnection(connection);
|
||||
UCSConnection::Instance()->SetConnection(connection);
|
||||
|
||||
zoneserver_list.UpdateUCSServerAvailable();
|
||||
}
|
||||
@@ -306,11 +310,11 @@ int main(int argc, char **argv)
|
||||
"UCS", [](std::shared_ptr<EQ::Net::ServertalkServerConnection> connection) {
|
||||
LogInfo("Connection lost from UCS Server [{}]", connection->GetUUID());
|
||||
|
||||
auto ucs_connection = UCSLink.GetConnection();
|
||||
auto ucs_connection = UCSConnection::Instance()->GetConnection();
|
||||
|
||||
if (ucs_connection->GetUUID() == connection->GetUUID()) {
|
||||
LogInfo("Removing currently active UCS connection");
|
||||
UCSLink.SetConnection(nullptr);
|
||||
UCSConnection::Instance()->SetConnection(nullptr);
|
||||
zoneserver_list.UpdateUCSServerAvailable(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user