Commit 1405a189 by Ryan Baxter

Closing response in Feign load balancer

parent a1c8cfe9
...@@ -91,6 +91,7 @@ public class RetryableFeignLoadBalancer extends FeignLoadBalancer implements Ser ...@@ -91,6 +91,7 @@ public class RetryableFeignLoadBalancer extends FeignLoadBalancer implements Ser
} }
Response response = request.client().execute(feignRequest, options); Response response = request.client().execute(feignRequest, options);
if(retryPolicy.retryableStatusCode(response.status())) { if(retryPolicy.retryableStatusCode(response.status())) {
response.close();
throw new RetryableStatusCodeException(RetryableFeignLoadBalancer.this.getClientName(), response.status()); throw new RetryableStatusCodeException(RetryableFeignLoadBalancer.this.getClientName(), response.status());
} }
return new RibbonResponse(request.getUri(), response); return new RibbonResponse(request.getUri(), response);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment