mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Properly close database connections when using --update-databases-only arg
(cherry picked from commit a9f9f737b2)
This commit is contained in:
@@ -157,6 +157,8 @@ int main(int argc, char** argv)
|
||||
if (!StartDB())
|
||||
return 1;
|
||||
|
||||
std::shared_ptr<void> dbHandle(nullptr, [](void*) { StopDB(); });
|
||||
|
||||
if (vm.count("update-databases-only"))
|
||||
return 0;
|
||||
|
||||
@@ -167,8 +169,6 @@ int main(int argc, char** argv)
|
||||
// Load IP Location Database
|
||||
sIPLocation->Load();
|
||||
|
||||
std::shared_ptr<void> dbHandle(nullptr, [](void*) { StopDB(); });
|
||||
|
||||
std::shared_ptr<Trinity::Asio::IoContext> ioContext = std::make_shared<Trinity::Asio::IoContext>();
|
||||
|
||||
// Start the listening port (acceptor) for auth connections
|
||||
|
||||
Reference in New Issue
Block a user