mirror of https://github.com/apache/nifi.git
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:
parent
98f5a1ab77
commit
1a388f957e
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue