If a running HTTP Proxy is removed from the tree, it will still be running... and storing samples! Plus, of course, the proxy port will stay busy until you quit JMeter. We need to stop it and remove all tree event listeners.
I fixed this issue in my machine by changing Remove.java and now the above mentioned problem with Http Proxy Server is not appearing. I attached a document containing the code changes made in Remove.java
Created attachment 11373 [details] for fixing the problem occuring when we rmove http proxy server from tree while the proxy server is running
Applied fix to CVS 2.0 branch
Oops! the change works, but fails to build in Ant, because Remove.java is built before the Proxy, and thus does not have the Proxy on the classpath. Rather than use Reflection or reorganise the build, I'll add a canRemove() method to Test Elements, with a default of true. Any test elements that need to do clean-up can then do it and return true, or just return false. Remove can display a message if canRemove() returns false.
Fix applied to CVS 2.0 - cannot now remove Proxy without first stopping it.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1262