Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
set read timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
g4rb4g3 committed Feb 7, 2020
1 parent 7cd914e commit 4e78b03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ android {
minSdkVersion 17
targetSdkVersion 17
versionCode 1
versionName "3.1.1.2"
versionName "3.1.1.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters 'armeabi-v7a'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ private void sendUpdate(String url) throws IOException, NoSuchAlgorithmException
BufferedReader reader = null;
try {
connection = (HttpsURLConnection) new URL(url).openConnection();
connection.setConnectTimeout((int) INTERVAL_SEND_UPDATE - 200);
connection.setConnectTimeout((int) INTERVAL_SEND_UPDATE / 2 - 100);
connection.setReadTimeout((int) INTERVAL_SEND_UPDATE / 2 - 100);
connection.setSSLSocketFactory(new TLSSocketFactory());
connection.connect();

Expand Down

0 comments on commit 4e78b03

Please sign in to comment.