DBZ-6730 Exit consumption loop if engine has stopped

This commit is contained in:
Chris Cranford 2023-07-31 03:25:08 -04:00 committed by Jiri Pechanec
parent fd1e60bf92
commit 58792c4a7c

View File

@ -542,7 +542,7 @@ protected int consumeRecordsUntil(BiPredicate<Integer, SourceRecord> condition,
int recordsConsumed = 0;
int nullReturn = 0;
boolean isLastRecord = false;
while (!isLastRecord) {
while (!isLastRecord && engine.isRunning()) {
SourceRecord record = consumedLines.poll(pollTimeoutInMs, TimeUnit.MILLISECONDS);
if (record != null) {
nullReturn = 0;