mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-12 00:25:25 +08:00
Fix for IllegalStateException while CodePushUpdateManager.downloadPackage (#1206)
This commit is contained in:
@@ -163,11 +163,11 @@ public class CodePushUpdateManager {
|
||||
try {
|
||||
URL downloadUrl = new URL(downloadUrlString);
|
||||
connection = (HttpURLConnection) (downloadUrl.openConnection());
|
||||
bin = new BufferedInputStream(connection.getInputStream());
|
||||
|
||||
long totalBytes = connection.getContentLength();
|
||||
long receivedBytes = 0;
|
||||
|
||||
bin = new BufferedInputStream(connection.getInputStream());
|
||||
File downloadFolder = new File(getCodePushPath());
|
||||
downloadFolder.mkdirs();
|
||||
downloadFile = new File(downloadFolder, CodePushConstants.DOWNLOAD_FILE_NAME);
|
||||
|
||||
Reference in New Issue
Block a user