diff options
author | daneren2005 <daneren2005@gmail.com> | 2014-06-24 16:13:42 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2014-06-24 16:13:42 -0700 |
commit | b6c6ba694fdee09e3cb3eb46e9f47d4fa613bc9e (patch) | |
tree | 62882cae96efd063777f89e9952d3abb0edcc308 /src/github | |
parent | 78b49438d5c30f138397a4228f08fb9012488c1e (diff) | |
download | dsub-b6c6ba694fdee09e3cb3eb46e9f47d4fa613bc9e.tar.gz dsub-b6c6ba694fdee09e3cb3eb46e9f47d4fa613bc9e.tar.bz2 dsub-b6c6ba694fdee09e3cb3eb46e9f47d4fa613bc9e.zip |
Possible fix for randomly exiting all threads in pool
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/util/BackgroundTask.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/github/daneren2005/dsub/util/BackgroundTask.java b/src/github/daneren2005/dsub/util/BackgroundTask.java index 4760577f..6ca8ea4c 100644 --- a/src/github/daneren2005/dsub/util/BackgroundTask.java +++ b/src/github/daneren2005/dsub/util/BackgroundTask.java @@ -136,11 +136,10 @@ public abstract class BackgroundTask<T> implements ProgressListener { public void cancel() { cancelled = true; - if(task != null) { - task.cancel(); - } if(cancelListener != null) { cancelListener.onCancel(); + } else if(task != null) { + task.cancel(); } } public boolean isCancelled() { |