mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Properly close database connections when using --update-databases-only arg
This commit is contained in:
@@ -218,11 +218,11 @@ extern 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;
|
||||
|
||||
std::shared_ptr<void> dbHandle(nullptr, [](void*) { StopDB(); });
|
||||
|
||||
// Set server offline (not connectable)
|
||||
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realm.Id.Realm);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user