sleep min 250 ms - max 7 sec

pull/502/head
Nitin 9 years ago
parent bc450c6c25
commit a9f7e65b0a

@ -573,7 +573,7 @@ public class HikariPool extends PoolBase implements HikariPoolMXBean, IBagStateL
// failed to get connection from db, sleep and retry
quietlySleep(sleepBackoff);
sleepBackoff = Math.min(connectionTimeout / 5, (long) (sleepBackoff * 1.3));
sleepBackoff = Math.min( TimeUnit.SECONDS.toMillis(7), Math.min(connectionTimeout / 4, (long) (sleepBackoff * 1.3)));
}
// Pool is suspended or shutdown or at max size
return Boolean.FALSE;

Loading…
Cancel
Save