Skip to content

Commit 1f742ba

Browse files
authored
Catch JedisException in loop instead of JCE (#3166)
1 parent bc0c384 commit 1f742ba

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎src/main/java/redis/clients/jedis/JedisClusterInfoCache.java‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import java.util.concurrent.locks.ReentrantReadWriteLock;
1515
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
1616

17-
import redis.clients.jedis.exceptions.JedisConnectionException;
1817
import redis.clients.jedis.exceptions.JedisException;
1918
import redis.clients.jedis.util.SafeEncoder;
2019

@@ -112,7 +111,7 @@ public void renewClusterSlots(Connection jedis) {
112111
try (Connection j = new Connection(hostAndPort, clientConfig)) {
113112
discoverClusterSlots(j);
114113
return;
115-
} catch (JedisConnectionException e) {
114+
} catch (JedisException e) {
116115
// try next nodes
117116
}
118117
}
@@ -127,7 +126,7 @@ public void renewClusterSlots(Connection jedis) {
127126
}
128127
discoverClusterSlots(j);
129128
return;
130-
} catch (JedisConnectionException e) {
129+
} catch (JedisException e) {
131130
// try next nodes
132131
}
133132
}

0 commit comments

Comments
 (0)