r2dbc/r2dbc-pool

Incorrect eviction predicate causing connection close

samueldlightfoot opened this issue · 1 comments

ConnectionPoolConfiguration.NO_TIMEOUT uses Duration.ofNanos(-1) but ConnectionPool evictionPredicate converts the timeout to millis, causing it to evaluate to 0 and hence true, therefore closing the connection eagerly.

It should use maxLifeTime.toNanos to align with NO_TIMEOUT.

Sorry duplicate of #155