Skip to content

Commit

Permalink
Fixed bug in connect_pool::put() when checking idle connections.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshuxin committed Aug 13, 2024
1 parent bdcaad0 commit 16ca5df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib_acl_cpp/src/connpool/connect_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void connect_pool::put(connect_client* conn, bool keep /* = true */)
delete conn;
}

if (idle_ttl_ >= 0 && now - last_check_ >= check_inter_) {
if (check_inter_ >= 0 && now - last_check_ >= check_inter_) {
(void) check_idle(idle_ttl_, false);
(void) time(&last_check_);
}
Expand Down

0 comments on commit 16ca5df

Please sign in to comment.