diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-03-13 19:09:51 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-03-13 19:09:51 -0700 |
commit | adb4bcb8908a8fa09d1f8a813b1922521d98facd (patch) | |
tree | 0aff4774c5429e2d154f4babd7442e50ce4237b9 /subsonic-android/src/github | |
parent | 62f3add1a698e060e70b70c91db0e970f506ae18 (diff) | |
download | dsub-adb4bcb8908a8fa09d1f8a813b1922521d98facd.tar.gz dsub-adb4bcb8908a8fa09d1f8a813b1922521d98facd.tar.bz2 dsub-adb4bcb8908a8fa09d1f8a813b1922521d98facd.zip |
Fix underestimating filesize screwing up stream
Diffstat (limited to 'subsonic-android/src/github')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/service/StreamProxy.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/StreamProxy.java b/subsonic-android/src/github/daneren2005/dsub/service/StreamProxy.java index 0972ecf2..0c5f9c2f 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/StreamProxy.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/StreamProxy.java @@ -180,7 +180,7 @@ public class StreamProxy implements Runnable { output.write(headers.getBytes());
// Loop as long as there's stuff to send
- while (isRunning && cbToSend>0 && !client.isClosed()) {
+ while (isRunning && !downloadFile.isWorkDone() && !client.isClosed()) {
// See if there's more to send
File file = new File(localPath);
@@ -204,11 +204,6 @@ public class StreamProxy implements Runnable { }
input.close();
}
-
- // Done regardless of whether or not it thinks it is
- if(downloadFile.isWorkDone()) {
- break;
- }
// If we did nothing this batch, block for a second
if (cbSentThisBatch == 0) {
|