2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-04 16:05:17 +00:00

[960-mysql-connection-pool] Addressed some comments

This commit is contained in:
Francis Dupont
2019-11-08 00:00:50 +01:00
parent 30dbe89d50
commit 624db298b1
2 changed files with 7 additions and 5 deletions

View File

@@ -1685,13 +1685,15 @@ private:
// MySqlLeaseContext Constructor
MySqlLeaseContext::MySqlLeaseContext(const DatabaseConnection::ParameterMap& parameters) : conn_(parameters) {
MySqlLeaseContext::
MySqlLeaseContext(const DatabaseConnection::ParameterMap& parameters)
: conn_(parameters) {
}
// MySqlLeaseContextAlloc Constructor and Destructor
MySqlLeaseMgr::MySqlLeaseContextAlloc::MySqlLeaseContextAlloc(const MySqlLeaseMgr& mgr)
: ctx_(), mgr_(mgr) {
MySqlLeaseMgr::MySqlLeaseContextAlloc::
MySqlLeaseContextAlloc(const MySqlLeaseMgr& mgr) : ctx_(), mgr_(mgr) {
if (MultiThreadingMgr::instance().getMode()) {
{
lock_guard<mutex> lock(mgr_.pool_->mutex_);
@@ -1707,7 +1709,7 @@ MySqlLeaseMgr::MySqlLeaseContextAlloc::MySqlLeaseContextAlloc(const MySqlLeaseMg
if (mgr_.pool_->pool_.empty()) {
isc_throw(Unexpected, "No available MySQL lease context?!");
}
ctx_ = mgr_.pool_->pool_[0];
ctx_ = mgr_.pool_->pool_.back();
}
}