From 2abb222171a82b69eaae4c1fac98f6ffea2b4a9b Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 29 Nov 2021 07:43:13 +0100 Subject: [PATCH] Consider new and terminated threads as finished --- app/src/main/java/eu/faircode/email/Core.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 29bb347728..93951689df 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -5531,7 +5531,9 @@ class Core { // https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.State.html Thread.State state = thread.getState(); - if (thread.isAlive()) { + if (thread.isAlive() && + state != Thread.State.NEW && + state != Thread.State.TERMINATED) { Log.e("Join " + name + " failed" + " state=" + state + " interrupted=" + interrupted); if (interrupted)