Don't assume 'now' is in milliseconds ... it's probably nanoseconds on most platforms.

pull/566/head
Brett Wooldridge 9 years ago
parent 7dfdf597e2
commit 91ad77b142

@ -591,7 +591,7 @@ public class HikariPool extends PoolBase implements HikariPoolMXBean, IBagStateL
final long idleTimeout = config.getIdleTimeout(); final long idleTimeout = config.getIdleTimeout();
// Detect retrograde time, allowing +128ms as per NTP spec. // Detect retrograde time, allowing +128ms as per NTP spec.
if (now + 128 < clockSource.plusMillis(previous, HOUSEKEEPING_PERIOD_MS)) { if (clockSource.plusMillis(now, 128) < clockSource.plusMillis(previous, HOUSEKEEPING_PERIOD_MS)) {
LOGGER.warn("{} - Retrograde clock change detected (housekeeper delta={}), soft-evicting connections from pool.", LOGGER.warn("{} - Retrograde clock change detected (housekeeper delta={}), soft-evicting connections from pool.",
clockSource.elapsedDisplayString(previous, now), poolName); clockSource.elapsedDisplayString(previous, now), poolName);
previous = now; previous = now;

Loading…
Cancel
Save