Skip to content

Commit dcbb2f1

Browse files
author
jordanqin
committed
update qcloud sdk to 1.5.52
1 parent 7f4d35c commit dcbb2f1

File tree

10 files changed

+8
-117
lines changed

10 files changed

+8
-117
lines changed
-592 Bytes
Binary file not shown.

QCloudFoundation/.idea/compiler.xml

Lines changed: 0 additions & 16 deletions
This file was deleted.

QCloudFoundation/.idea/gradle.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

QCloudFoundation/.idea/jarRepositories.xml

Lines changed: 0 additions & 40 deletions
This file was deleted.

QCloudFoundation/.idea/misc.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.

QCloudFoundation/.idea/modules.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

QCloudFoundation/.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

QCloudFoundation/foundation/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
minSdkVersion 15
88
targetSdkVersion 28
99

10-
versionCode 10551
11-
versionName "1.5.51"
10+
versionCode 10552
11+
versionName "1.5.52"
1212

1313
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
1414

@@ -42,7 +42,7 @@ dependencies {
4242
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
4343
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
4444

45-
testCompileOnly 'junit:junit:4.12'
45+
testCompileOnly 'junit:junit:4.13.2'
4646
testCompileOnly 'org.mockito:mockito-core:1.10.19'
4747

4848
compileOnly 'androidx.appcompat:appcompat:1.0.0'

QCloudFoundation/foundation/src/main/java/com/tencent/qcloud/core/http/interceptor/RetryInterceptor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,10 @@ Response processRequest(Chain chain, Request request, HttpTask task) throws IOEx
184184
attempts++;
185185
int statusCode = -1;
186186
try {
187+
//解决okhttp 3.14 以上版本报错 cannot make a new request because the previous response is still open: please call response.close()
188+
if (response != null && response.body() != null) {
189+
response.close();
190+
}
187191
response = executeTaskOnce(chain, request, task);
188192
statusCode = response.code();
189193
e = null;
@@ -216,10 +220,6 @@ Response processRequest(Chain chain, Request request, HttpTask task) throws IOEx
216220
} else if (shouldRetry(request, response, attempts, task.getWeight(), startTime, e, statusCode) && !task.isCanceled()) {
217221
QCloudLogger.i(HTTP_LOG_TAG, "%s failed for %s, code is %d", request, e, statusCode);
218222
retryStrategy.onTaskEnd(false, e);
219-
//解决okhttp 3.14 以上版本报错 cannot make a new request because the previous response is still open: please call response.close()
220-
// if (response != null) {
221-
// Util.closeQuietly(response.body());
222-
// }
223223
} else {
224224
QCloudLogger.i(HTTP_LOG_TAG, "%s ends for %s, code is %d", request, e, statusCode);
225225
break;

QCloudFoundation/quic/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dependencies {
6969
implementation fileTree(dir: 'libs', include: ['*.jar'])
7070

7171
compileOnly 'com.android.support:appcompat-v7:27.1.1'
72-
testCompileOnly 'junit:junit:4.12'
72+
testCompileOnly 'junit:junit:4.13.2'
7373
androidTestImplementation 'com.android.support.test:runner:1.0.2'
7474
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
7575
implementation project(path: ':foundation')

0 commit comments

Comments
 (0)