Skip to content

Commit 876db0b

Browse files
authored
Merge pull request #475 from scottkurz/fix-lmp-1878
Add WatchKey reset() in polling path
2 parents dc02c55 + 13fbceb commit 876db0b

File tree

1 file changed

+5
-0
lines changed
  • src/main/java/io/openliberty/tools/common/plugins/util

1 file changed

+5
-0
lines changed

src/main/java/io/openliberty/tools/common/plugins/util/DevUtil.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3536,6 +3536,11 @@ private void onAlteration(final ThreadPoolExecutor executor, final String parent
35363536
debug("Setting file track mode to FILE_WATCHER.");
35373537
trackingMode = FileTrackMode.FILE_WATCHER;
35383538
disablePolling();
3539+
Watchable watchable = wk.watchable(); // for debug msg below
3540+
boolean valid = wk.reset();
3541+
if (!valid) {
3542+
debug("WatchService key has been unregistered for " + watchable);
3543+
}
35393544
}
35403545
} catch (Exception e) {
35413546
error("An error occurred attempting to retrieve the watch key or close the file watcher. " + e.getMessage(), e);

0 commit comments

Comments
 (0)