aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-09-27 20:27:20 +0200
committerChristian Schneppe <christian@pix-art.de>2018-09-27 20:27:20 +0200
commit67547e73159d71e3b6c3fec3b2ea1cea4dd4c076 (patch)
tree24b409450eddd73cbb80398632f43cf2fe761126
parent7f77edb3bc01b9bd84bbae2be94390b34f9a03b2 (diff)
interrupt sub thread in resolver
-rw-r--r--src/main/java/de/pixart/messenger/utils/Resolver.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/Resolver.java b/src/main/java/de/pixart/messenger/utils/Resolver.java
index d0985edce..e159c3dd0 100644
--- a/src/main/java/de/pixart/messenger/utils/Resolver.java
+++ b/src/main/java/de/pixart/messenger/utils/Resolver.java
@@ -122,7 +122,12 @@ public class Resolver {
}
}
} catch (InterruptedException e) {
- return results;
+ for (Thread thread : threads) {
+ thread.interrupt();
+ }
+ synchronized (results) {
+ return new ArrayList<>(results);
+ }
}
}