From c4dc381a21db061870247aae1eafb4846e0411fb Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Tue, 9 Jun 2015 00:03:23 -0700 Subject: [PATCH] Attempt to fix failing build --- .../boot/devtools/filewatch/FileSystemWatcher.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java b/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java index a8b4e80dca8..6a4547fe4b8 100644 --- a/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java +++ b/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java @@ -232,7 +232,9 @@ public class FileSystemWatcher { Thread thread = this.watchThread; if (thread != null) { this.remainingScans.set(remainingScans); - thread.interrupt(); + if (remainingScans <= 0) { + thread.interrupt(); + } if (Thread.currentThread() != thread) { try { thread.join();