Skip to content

Commit

Permalink
Fixing issue of cleaning expired connections
Browse files Browse the repository at this point in the history
  • Loading branch information
VijithaEkanayake committed Feb 2, 2016
1 parent b8e6002 commit 2622719
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,9 @@ class SimpleHostRoutingFilter extends ZuulFilter {
@Override
void run() {
try {
final CloseableHttpClient hc = CLIENT.get();

if (hc == null) {
return;
}

hc.close();
final HttpClient hc = CLIENT.get();
if (hc == null) return;
hc.getConnectionManager().closeExpiredConnections();
} catch (Throwable t) {
LOG.error("error closing expired connections", t);
}
Expand Down

0 comments on commit 2622719

Please sign in to comment.