diff --git a/src/main/java/com/aws/greengrass/logmanager/CloudWatchAttemptLogsProcessor.java b/src/main/java/com/aws/greengrass/logmanager/CloudWatchAttemptLogsProcessor.java index b1932818..6d7f0812 100644 --- a/src/main/java/com/aws/greengrass/logmanager/CloudWatchAttemptLogsProcessor.java +++ b/src/main/java/com/aws/greengrass/logmanager/CloudWatchAttemptLogsProcessor.java @@ -138,7 +138,7 @@ public CloudWatchAttempt processLogFiles(ComponentLogFileInformation componentLo long startPosition = logFileInformation.getStartPosition(); String fileHash = logFileInformation.getFileHash(); //This has been handled in the service, but leave here to prevent processor crash - if (logFile.isEmpty() || startPosition == logFile.length()) { + if (logFile.isEmpty() || startPosition >= logFile.length()) { componentLogFileInformation.getLogFileInformationList().remove(0); continue; }