Skip to content

Commit

Permalink
check connection by default vesoft-inc#401
Browse files Browse the repository at this point in the history
  • Loading branch information
vchangpengfei committed Jun 1, 2022
1 parent a8329e2 commit 3073c18
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ public boolean init(List<HostAddress> addresses, NebulaPoolConfig config)
objConfig.setMinIdle(config.getMinConnSize());
objConfig.setMaxIdle(config.getMaxConnSize());
objConfig.setMaxTotal(config.getMaxConnSize());
objConfig.setTestOnBorrow(true);
objConfig.setTestOnCreate(true);
objConfig.setTestOnReturn(true);
objConfig.setTestWhileIdle(true);
objConfig.setTimeBetweenEvictionRunsMillis(config.getIntervalIdle() <= 0
? BaseObjectPoolConfig.DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
: config.getIntervalIdle());
Expand Down

0 comments on commit 3073c18

Please sign in to comment.