diff --git a/app/master/tools/lib_global/src/ipc_monitor.cpp b/app/master/tools/lib_global/src/ipc_monitor.cpp index cd69cdc6e..041733a5e 100644 --- a/app/master/tools/lib_global/src/ipc_monitor.cpp +++ b/app/master/tools/lib_global/src/ipc_monitor.cpp @@ -29,6 +29,6 @@ void ipc_monitor::check_idle(void) for (std::vector::iterator it = pools.begin(); it != pools.end(); ++it) { - (*it)->check_idle(ttl_); + (*it)->check_idle((time_t) ttl_); } } diff --git a/lib_acl_cpp/include/acl_cpp/connpool/connect_pool.hpp b/lib_acl_cpp/include/acl_cpp/connpool/connect_pool.hpp index 73972fc2b..6c4c02bc4 100644 --- a/lib_acl_cpp/include/acl_cpp/connpool/connect_pool.hpp +++ b/lib_acl_cpp/include/acl_cpp/connpool/connect_pool.hpp @@ -100,6 +100,14 @@ public: */ void put(connect_client* conn, bool keep = true); + /** + * 检查连接池中空闲的连接,释放过期连接 + * @param ttl {time_t} 该值 >= 0 时,过期时间大于此值的连接将被关闭 + * @param exclusive {bool} 内部是否需要加锁 + * @return {size_t} 返回被释放空闲连接个数 + */ + size_t check_idle(time_t ttl, bool exclusive = true); + /** * 检查连接池中空闲的连接,释放过期连接(过期时间使用 set_idle_ttl() 设置的值) * @param exclusive {bool} 内部是否需要加锁 @@ -117,14 +125,6 @@ public: */ size_t check_idle(time_t ttl, bool kick_dead, bool exclusive = true); - /** - * 检查连接池中空闲的连接,释放过期连接 - * @param ttl {time_t} 该值 >= 0 时,过期时间大于此值的连接将被关闭 - * @param exclusive {bool} 内部是否需要加锁 - * @return {size_t} 返回被释放空闲连接个数 - */ - size_t check_idle(time_t ttl, bool exclusive = true); - /** * 检测连接状态,并关闭断开连接,内部自动加锁保护 * @param count {size_t} 检测的连接个数,缺省值为 0 表示检测所有连接