Index: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java =================================================================== --- src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (revision 1178813) +++ src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (working copy) @@ -1202,7 +1202,7 @@ final ThreadPoolExecutor exec = new ThreadPoolExecutor( poolSize, poolSize, KEEPALIVETIME, TimeUnit.SECONDS, new LinkedBlockingQueue()); - + boolean wasSuccessful = false; try { // sample all resources with threadpool final List> retExec = exec.invokeAll(liste); @@ -1217,10 +1217,19 @@ res.addSubResult(binRes); res.setSuccessful(res.isSuccessful() && binRes.isSuccessful()); } + wasSuccessful = true; } catch (InterruptedException ie) { log.warn("Interruped fetching embedded resources", ie); // $NON-NLS-1$ } catch (ExecutionException ee) { log.warn("Execution issue when fetching embedded resources", ee); // $NON-NLS-1$ + } finally { + if(!wasSuccessful) { + try { + exec.shutdownNow(); + } catch (Exception e) { + //NOOP + } + } } } }