From 6e4d8de10442eecf71ba36ad015872a135a53338 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 7 Jul 2020 17:50:52 +0100 Subject: Revert "Verify database connection on interval (#9665)" Fixes #10113 This reverts commit 5c588f89e79e02cba392abe3d00688772321f88b. --- src/database/database-sqlite3.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src/database/database-sqlite3.h') diff --git a/src/database/database-sqlite3.h b/src/database/database-sqlite3.h index 647eddf7a..d7202a918 100644 --- a/src/database/database-sqlite3.h +++ b/src/database/database-sqlite3.h @@ -36,13 +36,13 @@ public: void beginSave(); void endSave(); - // Open and initialize the database if needed - virtual void pingDatabase(); - bool initialized() const { return m_initialized; } protected: Database_SQLite3(const std::string &savedir, const std::string &dbname); + // Open and initialize the database if needed + void verifyDatabase(); + // Convertors inline void str_to_sqlite(sqlite3_stmt *s, int iCol, const std::string &str) const { @@ -146,8 +146,6 @@ public: MapDatabaseSQLite3(const std::string &savedir); virtual ~MapDatabaseSQLite3(); - virtual void pingDatabase() { Database_SQLite3::pingDatabase(); } - bool saveBlock(const v3s16 &pos, const std::string &data); void loadBlock(const v3s16 &pos, std::string *block); bool deleteBlock(const v3s16 &pos); @@ -175,8 +173,6 @@ public: PlayerDatabaseSQLite3(const std::string &savedir); virtual ~PlayerDatabaseSQLite3(); - virtual void pingDatabase() { Database_SQLite3::pingDatabase(); } - void savePlayer(RemotePlayer *player); bool loadPlayer(RemotePlayer *player, PlayerSAO *sao); bool removePlayer(const std::string &name); @@ -212,8 +208,6 @@ public: AuthDatabaseSQLite3(const std::string &savedir); virtual ~AuthDatabaseSQLite3(); - virtual void pingDatabase() { Database_SQLite3::pingDatabase(); } - virtual bool getAuth(const std::string &name, AuthEntry &res); virtual bool saveAuth(const AuthEntry &authEntry); virtual bool createAuth(AuthEntry &authEntry); -- cgit v1.2.3