Add exception handling in caso of unexecpected errors
This commit is contained in:
@@ -28,10 +28,12 @@ public abstract class JedisClusterConnectionHandler {
|
||||
hostAndPort.getPort());
|
||||
this.nodes.put(hostAndPort.getHost() + hostAndPort.getPort(), jp);
|
||||
Jedis jedis = jp.getResource();
|
||||
discoverClusterNodesAndSlots(jedis);
|
||||
jp.returnResource(jedis);
|
||||
try {
|
||||
discoverClusterNodesAndSlots(jedis);
|
||||
} finally {
|
||||
jp.returnResource(jedis);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void discoverClusterNodesAndSlots(Jedis jedis) {
|
||||
|
||||
Reference in New Issue
Block a user