Author: sebb
Date: Tue Sep 27 21:14:55 2011
New Revision: 1176621
URL: http://svn.apache.org/viewvc?rev=1176621&view=rev
Log:
More workrounds for HC4 bug
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Modified:
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1176621&r1=1176620&r2=1176621&view=diff
==============================================================================
---
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
(original)
+++
jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Tue Sep 27 21:14:55 2011
@@ -476,18 +476,21 @@ public class HTTPHC4Impl extends HTTPHCA
* When connect fails due to abort, the request is
not in the context.
* Tried adding the request - with a new key - to
the local context in the sample() method,
* but the request was not flagged as aborted, so
that did not help.
- * So we check for the specific exception that is
triggered.
+ * So we check for any specific exception that is
triggered.
*/
- if (ex instanceof java.net.BindException) {
+ if (
+ (ex instanceof java.net.BindException &&
+ ex.getMessage().contains("Address already
in use: connect"))
+ ||
+ ex.getMessage().contains("Request
aborted") // plain IOException
+ ) {
/*
- * This message is generated by aborted
connects.
- * If it occurs in other situations, retrying
is unlikely to help,
+ * The above messages may be generated by
aborted connects.
+ * If either occurs in other situations,
retrying is unlikely to help,
* so preventing retry should not cause a
problem.
*/
- if (ex.getMessage().contains("Address already
in use: connect")){
- log.warn("Workround for HTTPCLIENT-1120
connect retry: "+ex);
- return false;
- }
+ log.warn("Workround for HTTPCLIENT-1120
connect retry: "+ex);
+ return false;
}
return super.retryRequest(ex, count, ctx);
} // end of hack
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]