interrupt before wait sleep so haltWatchers is more likely to return after watchThrea...
[vamsas.git] / src / uk / ac / vamsas / client / simpleclient / VamsasFileWatcherThread.java
index f0af3d4..d1b2592 100644 (file)
@@ -47,8 +47,8 @@ public class VamsasFileWatcherThread extends Thread {
     // wait arount for WATCH_SLEEP milliseconds before returning\r
     // in the hope that the watcher loop has stopped\r
     try {\r
-      long time = System.currentTimeMillis()+WATCH_SLEEP;\r
       interrupt();\r
+      long time = System.currentTimeMillis()+WATCH_SLEEP;\r
       while (running && time>System.currentTimeMillis()) {\r
         Thread.sleep(1);\r
       }\r