mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
[#2034] atexit(mysql_library_end())
This commit is contained in:
@@ -23,7 +23,9 @@ using namespace std;
|
||||
namespace isc {
|
||||
namespace db {
|
||||
|
||||
bool MySqlHolder::atexit_ = []{atexit([]{mysql_library_end();});return true;};
|
||||
int MySqlHolder::atexit_ = [] {
|
||||
return atexit([] { mysql_library_end(); });
|
||||
}();
|
||||
|
||||
/// @todo: Migrate this default value to src/bin/dhcpX/simple_parserX.cc
|
||||
const int MYSQL_DEFAULT_CONNECTION_TIMEOUT = 5; // seconds
|
||||
|
@@ -161,9 +161,11 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
static bool atexit_; ///< Flag to call atexit once.
|
||||
/// @brief Variable used for its static property to call atexit() once.
|
||||
static int atexit_;
|
||||
|
||||
MYSQL* mysql_; ///< Initialization context
|
||||
/// @brief Initialization context
|
||||
MYSQL* mysql_;
|
||||
};
|
||||
|
||||
/// @brief Forward declaration to @ref MySqlConnection.
|
||||
|
Reference in New Issue
Block a user