mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 09:55:28 +03:00
remove destructor, close environment only once
This commit is contained in:
@@ -40,11 +40,6 @@ namespace backend {
|
|||||||
LMDB::LMDB(std::string name) :
|
LMDB::LMDB(std::string name) :
|
||||||
Collection(name), m_env(NULL), isOpen(false) {}
|
Collection(name), m_env(NULL), isOpen(false) {}
|
||||||
|
|
||||||
|
|
||||||
LMDB::~LMDB() {
|
|
||||||
mdb_env_close(m_env);
|
|
||||||
}
|
|
||||||
|
|
||||||
int LMDB::txn_begin(unsigned int flags, MDB_txn **ret) {
|
int LMDB::txn_begin(unsigned int flags, MDB_txn **ret) {
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
MDBEnvProvider* provider = MDBEnvProvider::GetInstance();
|
MDBEnvProvider* provider = MDBEnvProvider::GetInstance();
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ class LMDB :
|
|||||||
public Collection {
|
public Collection {
|
||||||
public:
|
public:
|
||||||
explicit LMDB(std::string name);
|
explicit LMDB(std::string name);
|
||||||
~LMDB();
|
|
||||||
void store(std::string key, std::string value) override;
|
void store(std::string key, std::string value) override;
|
||||||
|
|
||||||
bool storeOrUpdateFirst(const std::string &key,
|
bool storeOrUpdateFirst(const std::string &key,
|
||||||
|
|||||||
Reference in New Issue
Block a user