NIFI-1111: We were subtracting values in the wrong order so that we always would 'yield' for a negative amount of time, which equated to not yielding at all.

This commit is contained in:
Mark Payne 2015-11-04 16:30:20 -05:00
parent 98f5a1ab77
commit 1a388f957e
1 changed files with 1 additions and 1 deletions

View File

@ -127,7 +127,7 @@ public class TimerDrivenSchedulingAgent implements SchedulingAgent {
// after the yield has expired.
final long newYieldExpiration = connectable.getYieldExpiration();
if (newYieldExpiration > System.currentTimeMillis()) {
final long yieldMillis = System.currentTimeMillis() - newYieldExpiration;
final long yieldMillis = newYieldExpiration - System.currentTimeMillis();
final ScheduledFuture<?> scheduledFuture = futureRef.get();
if (scheduledFuture == null) {
return;