Skip to content

Commit 9892300

Browse files
committed
JAVA-2934: Get rid of code hanging if there is empty page with next page attribute
1 parent eea59c6 commit 9892300

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

core/src/main/java/com/datastax/dse/driver/internal/core/cql/reactive/ReactiveResultSetSubscription.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,10 @@ private Object tryNext() {
277277
if (pages.poll() == null) {
278278
throw new AssertionError("Queue is empty, this should not happen");
279279
}
280-
current = pages.peek();
281280
// if the next page is readily available,
282281
// serve its first row now, no need to wait
283282
// for the next drain.
284-
if (current != null && current.hasMoreRows()) {
285-
return current.nextRow();
286-
}
283+
tryNext();
287284
}
288285
}
289286
// No items available right now.

0 commit comments

Comments
 (0)