Merge branch 'NIFI-1208'

This commit is contained in:
Bryan Bende 2015-11-23 21:35:57 -05:00
commit 4281a51c83
2 changed files with 3 additions and 1 deletions

View File

@ -238,8 +238,9 @@ public class ListenSyslog extends AbstractSyslogProcessor {
initialEvent = syslogEvents.poll(); initialEvent = syslogEvents.poll();
} }
// if nothing in either queue then just return // if nothing in either queue then yield and return
if (initialEvent == null) { if (initialEvent == null) {
context.yield();
return; return;
} }

View File

@ -260,6 +260,7 @@ public class PutSyslog extends AbstractSyslogProcessor {
final List<FlowFile> flowFiles = session.get(batchSize); final List<FlowFile> flowFiles = session.get(batchSize);
if (flowFiles == null || flowFiles.isEmpty()) { if (flowFiles == null || flowFiles.isEmpty()) {
pruneIdleSenders(context.getProperty(IDLE_EXPIRATION).asTimePeriod(TimeUnit.MILLISECONDS).longValue()); pruneIdleSenders(context.getProperty(IDLE_EXPIRATION).asTimePeriod(TimeUnit.MILLISECONDS).longValue());
context.yield();
return; return;
} }