mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
Close DB properly
This commit is contained in:
parent
889fc985c4
commit
3e855cbdac
@ -49,6 +49,10 @@ void Database::open() {
|
|||||||
std::cout << message << std::endl;
|
std::cout << message << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Database::close() {
|
||||||
|
sqlite3_close(db);
|
||||||
|
}
|
||||||
|
|
||||||
void Database::createTables() {
|
void Database::createTables() {
|
||||||
|
|
||||||
char* errMsg = 0;
|
char* errMsg = 0;
|
||||||
|
@ -45,6 +45,7 @@ namespace Database {
|
|||||||
#pragma endregion DatabaseStructs
|
#pragma endregion DatabaseStructs
|
||||||
|
|
||||||
void open();
|
void open();
|
||||||
|
void close();
|
||||||
void createTables();
|
void createTables();
|
||||||
int getTableSize(std::string tableName);
|
int getTableSize(std::string tableName);
|
||||||
|
|
||||||
|
@ -48,7 +48,8 @@ void terminate(int arg) {
|
|||||||
|
|
||||||
if (shardServer != nullptr && shardThread != nullptr)
|
if (shardServer != nullptr && shardThread != nullptr)
|
||||||
shardServer->kill();
|
shardServer->kill();
|
||||||
|
|
||||||
|
Database::close();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user