Skip to content

Commit

Permalink
Merge pull request #225 from /issues/127
Browse files Browse the repository at this point in the history
Fix for #127
  • Loading branch information
kerumai committed Jun 8, 2016
2 parents d084b1b + 73d86bf commit 48594dc
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,19 @@ HttpResponse forward() throws Exception {

HttpResponse response = restClient.executeWithLoadBalancer(httpClientRequest);
context.setZuulResponse(response);

// Here we want to handle the case where this hystrix command timed-out before the
// ribbon client received a response from origin. So in this situation we want to
// cleanup this response (release connection) now, as we know that the zuul filter
// chain has already continued without us and therefore won't cleanup itself.
if (isResponseTimedOut()) {
response.close();
}

return response;
}



public static class UnitTest {

Expand Down

0 comments on commit 48594dc

Please sign in to comment.