diff --git a/zuul-simple-webapp/src/main/groovy/filters/route/SimpleHostRoutingFilter.groovy b/zuul-simple-webapp/src/main/groovy/filters/route/SimpleHostRoutingFilter.groovy index 68b4a4eae3..c5aff2b18a 100644 --- a/zuul-simple-webapp/src/main/groovy/filters/route/SimpleHostRoutingFilter.groovy +++ b/zuul-simple-webapp/src/main/groovy/filters/route/SimpleHostRoutingFilter.groovy @@ -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); }