Skip to content

Commit

Permalink
Fix close() in retry handler
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Mar 21, 2016
1 parent 4bbb4a5 commit 9946a01
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public Response intercept(Chain chain) throws IOException {

// try the request
Response response = chain.proceed(request);
response.body().close();

int tryCount = 0;
while (retryStrategy.shouldRetry(tryCount, response)) {
tryCount++;
response.body().close();
// retry the request
response = chain.proceed(request);
}
Expand Down

0 comments on commit 9946a01

Please sign in to comment.