diff options
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index e1f694e6..24dcbabd 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -812,8 +812,16 @@ public class RESTMusicService implements MusicService { task.setOnCancelListener(new CancellableTask.OnCancelListener() { @Override public void onCancel() { - cancelled.set(true); - request.abort(); + new Thread(new Runnable() { + public void run() { + try { + cancelled.set(true); + request.abort(); + } catch(Exception e) { + Log.e(TAG, "Failed to stop http task"); + } + } + }).start(); } }); } |