Reset thread's interrupted flag when catching InterruptedException

Closes gh-6360
This commit is contained in:
Andy Wilkinson
2016-07-11 16:42:36 +01:00
parent e53d3167ab
commit 4963cfd67b
9 changed files with 12 additions and 7 deletions

View File

@@ -91,7 +91,7 @@ public final class RemoteSpringApplication {
Thread.sleep(1000);
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
}
}

View File

@@ -52,7 +52,7 @@ class FileWatchingFailureHandler implements FailureHandler {
latch.await();
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
return Outcome.RETRY;
}

View File

@@ -239,7 +239,7 @@ public class FileSystemWatcher {
scan();
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
remainingScans = this.remainingScans.get();
}

View File

@@ -96,7 +96,7 @@ class DelayedLiveReloadTrigger implements Runnable {
this.liveReloadServer.triggerReload();
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
}

View File

@@ -98,7 +98,7 @@ public class TunnelClient implements SmartInitializingSingleton {
this.serverThread.join(2000);
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
this.serverThread = null;
}

View File

@@ -273,6 +273,7 @@ public class HttpTunnelServer {
this.httpConnections.wait(HttpTunnelServer.this.longPollTimeout);
}
catch (InterruptedException ex) {
Thread.currentThread().interrupt();
closeHttpConnections();
}
httpConnection = this.httpConnections.pollFirst();
@@ -442,7 +443,7 @@ public class HttpTunnelServer {
}
}
catch (InterruptedException ex) {
// Ignore
Thread.currentThread().interrupt();
}
}
}