Update DownloadRunnable.java
This commit is contained in:
parent
b1d89175fc
commit
08a081437f
1 changed files with 1 additions and 1 deletions
|
@ -117,7 +117,7 @@ public class DownloadRunnable extends Thread {
|
||||||
byte[] buf = new byte[DownloadMission.BUFFER_SIZE];
|
byte[] buf = new byte[DownloadMission.BUFFER_SIZE];
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
// use alwways start <= end
|
// use always start <= end
|
||||||
// fixes a deadlock in DownloadRunnable because youtube is sending one byte alone after downloading 26MiB exactly
|
// fixes a deadlock in DownloadRunnable because youtube is sending one byte alone after downloading 26MiB exactly
|
||||||
while (start <= end && mMission.running && (len = is.read(buf, 0, buf.length)) != -1) {
|
while (start <= end && mMission.running && (len = is.read(buf, 0, buf.length)) != -1) {
|
||||||
f.write(buf, 0, len);
|
f.write(buf, 0, len);
|
||||||
|
|
Loading…
Reference in a new issue