mirror of
https://github.com/EQEmu/Server.git
synced 2026-10-08 17:53:35 +00:00
Fix for DBCore crash
This commit is contained in:
1 parent
2af6e8cd16
commit
a2500ff814
1 file changed
+3
-1
+3
-1
@@ -38,6 +38,7 @@ DBcore::DBcore() {
|
||||
pDatabase = 0;
|
||||
pCompress = false;
|
||||
pSSL = false;
|
||||
pStatus = Closed;
|
||||
}
|
||||
|
||||
DBcore::~DBcore() {
|
||||
@@ -180,9 +181,10 @@ bool DBcore::Open(uint32* errnum, char* errbuf) {
|
||||
LockMutex lock(&MDatabase);
|
||||
if (GetStatus() == Connected)
|
||||
return true;
|
||||
if (GetStatus() == Error)
|
||||
if (GetStatus() == Error) {
|
||||
mysql_close(&mysql);
|
||||
mysql_init(&mysql); // Initialize structure again
|
||||
}
|
||||
if (!pHost)
|
||||
return false;
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user