Bug 57858 - sampleEnd called twice by HTTPHC4Impl
Summary: sampleEnd called twice by HTTPHC4Impl
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-26 11:43 UTC by Felix Schumacher
Modified: 2015-04-26 11:51 UTC (History)
0 users



Attachments
Only call sampleEnd, when it is not already set (1.44 KB, patch)
2015-04-26 11:43 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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