Bug 57858

Summary: sampleEnd called twice by HTTPHC4Impl
Product: JMeter - Now in Github Reporter: Felix Schumacher <felix.schumacher>
Component: HTTPAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 2.13   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Only call sampleEnd, when it is not already set

Description Felix Schumacher 2015-04-26 11:43:42 UTC
Created attachment 32686 [details]
Only call sampleEnd, when it is not already set

sampleEnd might be called twice by HTTPHC4Impl when a RuntimeException or an IOException happened after sampleEnd has already been set in its try block.

The attached patch will log the actual exception first and then call sampleEnd if it is not already set only. It will also log a previously set requestHeader if it will be overwritten by the catch block.
Comment 1 Felix Schumacher 2015-04-26 11:51:46 UTC
Date: Sun Apr 26 11:51:09 2015
New Revision: 1676099

URL: http://svn.apache.org/r1676099
Log:
Don't call sampleEnd twice in HTTPHC4Impl when a RuntimeException or an IOException occurs in the sample method.

Bugzilla Id: 57858

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 The ASF infrastructure team 2022-09-24 20:37:59 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3586