DATAREDIS-953 - Release connection after failed validation only once.

We now release a connection after a failed validation only once. Previously, a connection was released twice which caused a failure if the connection was obtained from a pool.

Original Pull Request: #445
This commit is contained in:
Mark Paluch
2019-03-27 09:51:27 +01:00
committed by Christoph Strobl
parent 138198fd0f
commit 5cd8bb8e27
2 changed files with 27 additions and 5 deletions

View File

@@ -1170,12 +1170,7 @@ public class LettuceConnectionFactory
if (!valid) {
if (connection != null) {
connectionProvider.release(connection);
}
log.warn("Validation of shared connection failed. Creating a new connection.");
resetConnection();
this.connection = getNativeConnection();
}