You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2007/12/13 16:47:43 UTC
svn commit: r603941 -
/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
Author: sebb
Date: Thu Dec 13 07:47:40 2007
New Revision: 603941
URL: http://svn.apache.org/viewvc?rev=603941&view=rev
Log:
Avoid possible NPE; revert to original close method
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java?rev=603941&r1=603940&r2=603941&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java (original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java Thu Dec 13 07:47:40 2007
@@ -1072,7 +1072,10 @@
{
Map.Entry entry = (Map.Entry) it.next();
HttpClient cl = (HttpClient) entry.getValue();
- ((SimpleHttpConnectionManager)cl.getHttpConnectionManager()).shutdown();// Closes the connection
+ // Can cause NPE in HttpClient 3.1
+ //((SimpleHttpConnectionManager)cl.getHttpConnectionManager()).shutdown();// Closes the connection
+ // Revert to original method:
+ cl.getHttpConnectionManager().closeIdleConnections(-1000);// Closes the connection
}
map.clear();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org