diff --git a/src/main/java/org/redisson/RedissonSet.java b/src/main/java/org/redisson/RedissonSet.java index 68c29d920..a920ba04c 100644 --- a/src/main/java/org/redisson/RedissonSet.java +++ b/src/main/java/org/redisson/RedissonSet.java @@ -75,10 +75,10 @@ public class RedissonSet implements Set { @Override public boolean retainAll(Collection c) { - int changed = 0; RedisConnection conn = redisson.connect(); try { while (true) { + int changed = 0; conn.watch(name); Iterator iterator = (Iterator) conn.smembers(name).iterator(); conn.multi();