yozaner1324 commented on code in PR #7582: URL: https://github.com/apache/geode/pull/7582#discussion_r848904691
########## geode-core/src/main/java/org/apache/geode/internal/process/ControlFileWatchdog.java: ########## @@ -93,12 +100,15 @@ private void doWork() { } } - private void handleRequest() throws IOException { - try { // always delete file after invoking handler - requestHandler.handleRequest(); + private void handleRequest(FileReader fileReader) throws IOException { + // always delete file after invoking handler + try (FileReader reader = fileReader) { + requestHandler.handleRequest(reader); } finally { try { - file.delete(); + if (!file.delete()) { + logger.warn("Unable to delete{}", file); Review Comment: Also a good catch, fixed now. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@geode.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org