Moved the extraction of scheme from sentinel address in order to always be available regardless whether a password is required.

Signed-off-by: Matthias Portelli <matthiasp@ccbill.com>
pull/2534/head
Matthias Portelli 5 years ago
parent 97f9451ddb
commit 9f7dff9c56

@ -206,13 +206,13 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager {
for (String address : cfg.getSentinelAddresses()) {
RedisURI addr = new RedisURI(address);
scheme = addr.getScheme();
RedisClient client = createClient(NodeType.SENTINEL, addr, this.config.getConnectTimeout(), this.config.getTimeout(), null);
try {
RedisConnection c = client.connect();
connected = true;
try {
c.sync(RedisCommands.PING);
scheme = addr.getScheme();
} catch (RedisAuthRequiredException e) {
usePassword = true;
}

Loading…
Cancel
Save