diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/github/daneren2005/dsub/util/BackgroundTask.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/util/BackgroundTask.java b/src/github/daneren2005/dsub/util/BackgroundTask.java index 9f5688bc..9f749116 100644 --- a/src/github/daneren2005/dsub/util/BackgroundTask.java +++ b/src/github/daneren2005/dsub/util/BackgroundTask.java @@ -159,7 +159,7 @@ public abstract class BackgroundTask<T> implements ProgressListener { } }); } catch(InterruptedException interrupt) { - if(!isCancelled()) { + if(taskStart.get()) { // Don't exit root thread if task cancelled throw interrupt; } @@ -210,6 +210,7 @@ public abstract class BackgroundTask<T> implements ProgressListener { task.execute(); } catch(InterruptedException stop) { running = false; + threads.remove(Thread.currentThread()); } catch(Throwable t) { Log.e(TAG, "Unexpected crash in BackgroundTask thread", t); } |