Skip to content

Commit

Permalink
check connection by default #401 (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
vchangpengfei authored Feb 24, 2023
1 parent a33e486 commit 3abd962
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public boolean init(List<HostAddress> addresses, NebulaPoolConfig config)
objConfig.setMaxTotal(config.getMaxConnSize());
objConfig.setTestOnBorrow(true);
objConfig.setTestOnReturn(true);
objConfig.setTestOnCreate(true);
objConfig.setTestWhileIdle(true);
objConfig.setTimeBetweenEvictionRunsMillis(config.getIntervalIdle() <= 0
? BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
: config.getIntervalIdle());
Expand Down

0 comments on commit 3abd962

Please sign in to comment.