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-postgresql.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/database/database-postgresql.h') diff --git a/src/database/database-postgresql.h b/src/database/database-postgresql.h index 340f0a7b8..409e62fe0 100644 --- a/src/database/database-postgresql.h +++ b/src/database/database-postgresql.h @@ -32,14 +32,13 @@ public: Database_PostgreSQL(const std::string &connect_string); ~Database_PostgreSQL(); - virtual void pingDatabase(); - void beginSave(); void endSave(); void rollback(); bool initialized() const; + protected: // Conversion helpers inline int pg_to_int(PGresult *res, int row, int col) @@ -84,6 +83,7 @@ protected: } void createTableIfNotExists(const std::string &table_name, const std::string &definition); + void verifyDatabase(); // Database initialization void connectToDatabase(); @@ -114,8 +114,6 @@ public: MapDatabasePostgreSQL(const std::string &connect_string); virtual ~MapDatabasePostgreSQL() = default; - virtual void pingDatabase() { Database_PostgreSQL::pingDatabase(); } - bool saveBlock(const v3s16 &pos, const std::string &data); void loadBlock(const v3s16 &pos, std::string *block); bool deleteBlock(const v3s16 &pos); @@ -135,8 +133,6 @@ public: PlayerDatabasePostgreSQL(const std::string &connect_string); virtual ~PlayerDatabasePostgreSQL() = default; - virtual void pingDatabase() { Database_PostgreSQL::pingDatabase(); } - void savePlayer(RemotePlayer *player); bool loadPlayer(RemotePlayer *player, PlayerSAO *sao); bool removePlayer(const std::string &name); -- cgit v1.2.3