From 13556fda47e247c3949c7c5fb5ff45be771f3530 Mon Sep 17 00:00:00 2001 From: Philippe Mouawad Date: Sat, 4 Feb 2017 14:28:03 +0000 Subject: [PATCH] Bug 60689 - "httpclient4.validate_after_inactivity" has no impact leading to usage of potentially stale/closed connections Bugzilla Id: 60689 git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1781673 13f79535-47bb-0310-9956-ffa450edef68 Former-commit-id: ed2dc1c6093d4901989f34114d78679cd227f03c --- .../conn/JMeterPoolingClientConnectionManager.java | 11 ++++++++++- xdocs/changes.xml | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java b/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java index 391460af37..bc1394d944 100644 --- a/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java +++ b/src/protocol/http/org/apache/http/impl/conn/JMeterPoolingClientConnectionManager.java @@ -106,7 +106,16 @@ public class JMeterPoolingClientConnectionManager implements ClientConnectionMan this.schemeRegistry = schemeRegistry; this.dnsResolver = dnsResolver; this.operator = createConnectionOperator(schemeRegistry); - this.pool = new HttpConnPool(this.log, this.operator, 2, 20, timeToLive, tunit); + this.pool = new HttpConnPool(this.log, this.operator, 2, 20, timeToLive, tunit) { + /** + * @see org.apache.http.pool.AbstractConnPool#validate(org.apache.http.pool.PoolEntry) + */ + @Override + protected boolean validate(HttpPoolEntry entry) { + return !entry.getConnection().isStale(); + } + + }; pool.setValidateAfterInactivity(validateAfterInactivity); } diff --git a/xdocs/changes.xml b/xdocs/changes.xml index 1f40482efc..e3d794e522 100644 --- a/xdocs/changes.xml +++ b/xdocs/changes.xml @@ -204,6 +204,7 @@ JMeter now requires Java 8. Ensure you use most up to date version.
  • 60575HTTP GET Requests could have a content-type header without a body.
  • 60643HTTP(S) Test Script Recorder doesn't correctly handle restart or start after stop. Contributed by Ubik Load Pack (support at ubikloadpack.com)
  • 60652PUT might leak file descriptors.
  • +
  • 60689httpclient4.validate_after_inactivity has no impact leading to usage of potentially stale/closed connections
  • Other Samplers