Skip to content
This repository has been archived by the owner on Oct 1, 2018. It is now read-only.

Set default connection timeout to match with iOS counterpart #107

Merged
merged 1 commit into from
Apr 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public static void download(String urlFrom, String filePath, String checkSum) th
}

URLConnection connection = downloadUrl.openConnection();
connection.setConnectTimeout(60000);
connection.connect();

InputStream input = new BufferedInputStream(downloadUrl.openStream());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ private String downloadJson() throws Exception {
}

URLConnection urlConnection = url.openConnection();
urlConnection.setConnectTimeout(60000);
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(urlConnection.getInputStream()));

char data[] = new char[1024];
Expand Down