diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-09-27 20:27:20 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-09-27 20:27:20 +0200 |
commit | 67547e73159d71e3b6c3fec3b2ea1cea4dd4c076 (patch) | |
tree | 24b409450eddd73cbb80398632f43cf2fe761126 | |
parent | 7f77edb3bc01b9bd84bbae2be94390b34f9a03b2 (diff) |
interrupt sub thread in resolver
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/Resolver.java | 7 |
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); + } } } |