ignore CWSE if shutting down

pull/5/head
Zlatin Balevsky 2019-06-18 19:44:22 +01:00
parent 64d45da94a
commit 1d6781819b
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,8 @@ import java.nio.file.FileSystems
import java.nio.file.Path import java.nio.file.Path
import java.nio.file.Paths import java.nio.file.Paths
import static java.nio.file.StandardWatchEventKinds.* import static java.nio.file.StandardWatchEventKinds.*
import java.nio.file.ClosedWatchServiceException
import java.nio.file.WatchEvent import java.nio.file.WatchEvent
import java.nio.file.WatchKey import java.nio.file.WatchKey
import java.nio.file.WatchService import java.nio.file.WatchService
@ -79,7 +81,7 @@ class DirectoryWatcher {
} }
key.reset() key.reset()
} }
} catch (InterruptedException e) { } catch (InterruptedException|ClosedWatchServiceException e) {
if (!shutdown) if (!shutdown)
throw e throw e
} }