Make sure db index is only set once.

See: #2984
This commit is contained in:
Christoph Strobl
2024-09-13 09:38:22 +02:00
parent feda7dcf5b
commit f2a1af6cbb
2 changed files with 3 additions and 9 deletions

View File

@@ -961,14 +961,7 @@ public class LettuceConnection extends AbstractRedisConnection {
@SuppressWarnings("unchecked")
protected StatefulConnection<byte[], byte[]> doGetAsyncDedicatedConnection() {
StatefulConnection<byte[], byte[]> connection = getConnectionProvider().getConnection(StatefulConnection.class);
if (customizedDatabaseIndex()) {
potentiallySelectDatabase(connection, this.dbIndex);
}
return connection;
return getConnectionProvider().getConnection(StatefulConnection.class);
}
@Override