svn commit: r904918 - /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java

[email protected]
Newsgroups gmane.comp.jakarta.jmeter.devel
Message-ID <[email protected]>
Author: sebb
Date: Sat Jan 30 23:36:48 2010
New Revision: 904918

URL: http://svn.apache.org/viewvc?rev=904918&view=rev
Log:
Stop interrupt() from attempting disconnect whilst we are already disconnecting

Modified:
    jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java

Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java?rev=904918&r1=904917&r2=904918&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java (original)
+++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler.java Sat Jan 30 23:36:48 2010
@@ -489,6 +489,7 @@
                     }
                     log.debug("Bind exception, try again");
                     if (conn!=null) {
+                        savedConn = null; // we don't want interrupt to try disconnection again
                         conn.disconnect();
                     }
                     this.setUseKeepAlive(false);
@@ -584,16 +585,18 @@
             res.sampleEnd();
             // We don't want to continue using this connection, even if KeepAlive is set
             if (conn != null) { // May not exist
+                savedConn = null; // we don't want interrupt to try disconnection again
                 conn.disconnect();
             }
+            savedConn = null; // we don't want interrupt to try disconnection again
             conn=null; // Don't process again
             return errorResult(e, res);
         } finally {
             // calling disconnect doesn't close the connection immediately,
             // but indicates we're through with it. The JVM should close
             // it when necessary.
+            savedConn = null; // we don't want interrupt to try disconnection again
             disconnect(conn); // Disconnect unless using KeepAlive
-            savedConn = null;
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.