Infinity loop with iterator fixed. #515

pull/520/head
Nikita 9 years ago
parent f8dfdb7154
commit 645b1240dc

@ -73,13 +73,19 @@ abstract class RedissonBaseIterator<V> implements Iterator<V> {
if (firstValues.isEmpty()) {
firstValues = lastValues;
lastValues = null;
if (firstValues.isEmpty() && tryAgain()) {
if (firstValues.isEmpty()) {
if (tryAgain()) {
client = null;
firstValues = null;
nextIterPos = 0;
prevIterPos = -1;
continue;
}
if (res.getPos() == 0) {
finished = true;
return false;
}
}
} else if (lastValues.removeAll(firstValues)) {
currentElementRemoved = false;
removeExecuted = false;

Loading…
Cancel
Save