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:
committed by
Christoph Strobl
parent
138198fd0f
commit
5cd8bb8e27
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user