From 9946a019ed13f7224d26aceb7455e15dd7528505 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Fri, 18 Mar 2016 16:08:24 -0700 Subject: [PATCH] Fix close() in retry handler --- .../src/main/java/com/microsoft/rest/retry/RetryHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client-runtime/src/main/java/com/microsoft/rest/retry/RetryHandler.java b/client-runtime/src/main/java/com/microsoft/rest/retry/RetryHandler.java index e56c061de6a01..649a769af99f0 100644 --- a/client-runtime/src/main/java/com/microsoft/rest/retry/RetryHandler.java +++ b/client-runtime/src/main/java/com/microsoft/rest/retry/RetryHandler.java @@ -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); }