1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-17 23:36:11 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

Fix download buffer overflow

This commit is contained in:
Sunny Luo
2020-02-07 22:28:17 +08:00
committed by GitHub
parent e9755392ec
commit 22a2902f71

View File

@@ -96,6 +96,7 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
double lastProgressValue=0;
while ((bytesRead = source.read(sink.buffer(), DOWNLOAD_CHUNK_SIZE)) != -1) {
totalRead += bytesRead;
sink.emit();
if (UpdateContext.DEBUG) {
Log.d("RNUpdate", "Progress " + totalRead + "/" + contentLength);
}