Skip to content

Commit

Permalink
Fix bug where disconnect is at the end of the iterator
Browse files Browse the repository at this point in the history
If a disconnect is detected in the last message then the
next() function never gets called to save the latest data
point and so it does not get plotted.
  • Loading branch information
rjwills28 committed Oct 24, 2023
1 parent 53eca92 commit fb44e9f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ protected void fetchDataInternal(String pvName) throws ArchiverApplianceExceptio
*/
@Override
public synchronized boolean hasNext() {
return !closed && mainIterator != null && mainIterator.hasNext();
boolean hasNext = !closed && mainIterator != null && mainIterator.hasNext();
if (reuseMessage && !hasNext) {
hasNext = true;
}
return hasNext;
}

/*
Expand Down

0 comments on commit fb44e9f

Please sign in to comment.