Skip to content

Commit 1e9767e

Browse files
committed
Get rid of code hanging if there is empty page with next page attribute
1 parent eea59c6 commit 1e9767e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,8 @@ private Object tryNext() {
277277
if (pages.poll() == null) {
278278
throw new AssertionError("Queue is empty, this should not happen");
279279
}
280-
current = pages.peek();
281-
// if the next page is readily available,
282-
// serve its first row now, no need to wait
283-
// for the next drain.
284-
if (current != null && current.hasMoreRows()) {
285-
return current.nextRow();
286-
}
280+
281+
tryNext();
287282
}
288283
}
289284
// No items available right now.

0 commit comments

Comments
 (0)