Skip to content

Commit

Permalink
Backport 94ec729faae7b45fcfe0a94dd42a90e4d08fd1ec
Browse files Browse the repository at this point in the history
  • Loading branch information
duke committed Jun 20, 2023
1 parent bda6723 commit 1ac08c2
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,18 @@ public void refresh() throws IOException {
Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Chunk: finalChunk=" + finalChunk);
absoluteChunkEnd = absoluteChunkStart + chunkSize;
return;
} else if (finished) {
throw new IOException("No metadata event found in finished chunk.");
} else {
if (finished) {
throw new IOException("No metadata event found in finished chunk.");
}
if (chunkSize == HEADER_SIZE) {
// This ensures that a non-streaming parser is able
// to break out of the loop in case the file is
// ended before the first metadata event has
// been written. This can happen during a failed crash
// dump.
input.pollWait();
}
}
}
}
Expand Down

0 comments on commit 1ac08c2

Please sign in to comment.