Skip to content

Commit

Permalink
fix range check
Browse files Browse the repository at this point in the history
  • Loading branch information
osiegmar committed Aug 19, 2023
1 parent 0f4c896 commit 6bf26c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ private CompletableFuture<Long> findOffset(final int row) {

private CompletableFuture<Void> waitForRow(final int row) {
return CompletableFuture.runAsync(() -> {
while (positions.size() < row && !scanner.isDone()) {
while (row >= positions.size() && !scanner.isDone()) {
Thread.onSpinWait();
}
});
Expand Down

0 comments on commit 6bf26c3

Please sign in to comment.