aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/authserver/Main.cpp')
-rwxr-xr-xsrc/server/authserver/Main.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp
index b3add13e9f8..29b5e508102 100755
--- a/src/server/authserver/Main.cpp
+++ b/src/server/authserver/Main.cpp
@@ -38,6 +38,7 @@
#endif
bool StartDB();
+void StopDB();
bool stopEvent = false; // Setting it to true stops the server
@@ -235,8 +236,8 @@ extern int main(int argc, char **argv)
}
}
- // Close the Database Pool
- LoginDatabase.Close();
+ // Close the Database Pool and library
+ StopDB();
sLog->outString("Halting process...");
return 0;
@@ -245,6 +246,8 @@ extern int main(int argc, char **argv)
// Initialize connection to the database
bool StartDB()
{
+ MySQL::Library_Init();
+
std::string dbstring = sConfig->GetStringDefault("LoginDatabaseInfo", "");
if (dbstring.empty())
{
@@ -275,3 +278,9 @@ bool StartDB()
return true;
}
+
+void StopDB()
+{
+ LoginDatabase.Close();
+ MySQL::Library_End();
+} \ No newline at end of file