From 67547e73159d71e3b6c3fec3b2ea1cea4dd4c076 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Thu, 27 Sep 2018 20:27:20 +0200 Subject: interrupt sub thread in resolver --- src/main/java/de/pixart/messenger/utils/Resolver.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main') 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); + } } } -- cgit v1.2.3