Skip to content

Commit

Permalink
#239 close input stream
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-asprino committed Dec 6, 2023
1 parent 06ed238 commit b2b565a
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,16 @@ public Iterator<Slice> iterator() {

@Override
public boolean hasNext() {
return recordIterator.hasNext();
boolean hasNext = recordIterator.hasNext();
if(!hasNext){
try {
in.close();
is.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return hasNext;
}

@Override
Expand Down

0 comments on commit b2b565a

Please sign in to comment.