diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-08-21 20:58:58 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-08-21 20:58:58 -0700 |
commit | cc6a6139fb1ea1262976a684ad4402acb751300b (patch) | |
tree | c31bdf891411c834f3f7b72059fbdddba2d74eb1 | |
parent | 1f32f067295d0aff56c373e9bc9069e2e712c21e (diff) | |
download | dsub-cc6a6139fb1ea1262976a684ad4402acb751300b.tar.gz dsub-cc6a6139fb1ea1262976a684ad4402acb751300b.tar.bz2 dsub-cc6a6139fb1ea1262976a684ad4402acb751300b.zip |
Fix last commit
-rw-r--r-- | src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java index fa21f9f0..192ee04c 100644 --- a/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java +++ b/src/github/daneren2005/dsub/service/DownloadServiceLifecycleSupport.java @@ -169,17 +169,21 @@ public class DownloadServiceLifecycleSupport { new Thread(new Runnable(){ @Override public void run() { + boolean locked = false; try { // Make sure everything is ready to go before handling event if(!setup.get()) { + locked = true; lock.lock(); } handleKeyEvent(event); } finally { - lock.unlock(); + if(locked) { + lock.unlock(); + } } } - }); + }).start(); } } } |