485031 two PathWatcher threads running after automatically restarting webapp

This commit is contained in:
Jan Bartel 2016-01-09 10:27:33 +11:00
parent 35134e2d05
commit 75b84374e0
1 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,9 @@
package org.eclipse.jetty.util;
import static java.nio.file.StandardWatchEventKinds.*;
import static java.nio.file.StandardWatchEventKinds.ENTRY_CREATE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_DELETE;
import static java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY;
import java.io.File;
import java.io.IOException;
@ -1244,7 +1246,7 @@ public class PathWatcher extends AbstractLifeCycle implements Runnable
LOG.debug("Starting java.nio file watching with {}",watchService);
}
while (watchService != null)
while (watchService != null && thread == Thread.currentThread())
{
WatchKey key = null;