NIFI-8020 Make sure TailFile doesn't leave FileChannel open when handling NUL characters

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #4671.
This commit is contained in:
Tamas Palfy 2020-11-17 20:44:42 +01:00 committed by Pierre Villard
parent a0328ff8d1
commit 4aaec5aa38
No known key found for this signature in database
GPG Key ID: F92A93B30C07C6D5
1 changed files with 1 additions and 0 deletions

View File

@ -799,6 +799,7 @@ public class TailFile extends AbstractProcessor {
if (abort.get() != null) {
session.remove(flowFile);
tfo.setState(new TailFileState(tailFile, file, reader, position, timestamp, length, checksum, state.getBuffer()));
throw abort.get();
}