Skip to content

Commit

Permalink
check the connection's status when borrow and return (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole00 committed Dec 30, 2022
1 parent e25c56d commit 4cf37a8
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ public boolean init(List<HostAddress> addresses, NebulaPoolConfig config)
objConfig.setMinIdle(config.getMinConnSize());
objConfig.setMaxIdle(config.getMaxConnSize());
objConfig.setMaxTotal(config.getMaxConnSize());
objConfig.setTestOnBorrow(true);
objConfig.setTestOnReturn(true);
objConfig.setTimeBetweenEvictionRunsMillis(config.getIntervalIdle() <= 0
? BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
: config.getIntervalIdle());
Expand Down

0 comments on commit 4cf37a8

Please sign in to comment.