mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-12 11:55:13 +08:00
Merge branch 'gitee-master' into gitlab-upstream
This commit is contained in:
commit
382471a74b
@ -283,10 +283,12 @@ void connect_pool::put(connect_client* conn, bool keep /* = true */)
|
||||
}
|
||||
|
||||
if (check_inter_ >= 0 && now - last_check_ >= check_inter_) {
|
||||
(void) check_idle(false, false);
|
||||
(void) time(&last_check_);
|
||||
lock_.unlock();
|
||||
|
||||
(void) check_idle(false, true);
|
||||
} else {
|
||||
lock_.unlock();
|
||||
}
|
||||
lock_.unlock();
|
||||
}
|
||||
|
||||
void connect_pool::refer()
|
||||
@ -340,6 +342,8 @@ size_t connect_pool::check_idle(time_t ttl, bool kick_dead, bool exclusive)
|
||||
lock_.lock();
|
||||
}
|
||||
|
||||
(void) time(&last_check_);
|
||||
|
||||
if (pool_.empty() && min_ == 0) {
|
||||
if (exclusive) {
|
||||
lock_.unlock();
|
||||
|
Loading…
Reference in New Issue
Block a user