diff --git a/redisson/src/main/java/org/redisson/connection/SentinelConnectionManager.java b/redisson/src/main/java/org/redisson/connection/SentinelConnectionManager.java index 51d9884c9..e1b0ee60a 100755 --- a/redisson/src/main/java/org/redisson/connection/SentinelConnectionManager.java +++ b/redisson/src/main/java/org/redisson/connection/SentinelConnectionManager.java @@ -444,7 +444,7 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager { return; } - Set currentSlaves = new HashSet<>(slavesMap.size()); + Set currentSlaves = Collections.newSetFromMap(new ConcurrentHashMap<>(slavesMap.size())); AsyncCountDownLatch latch = new AsyncCountDownLatch(); for (Map map : slavesMap) { if (map.isEmpty()) {