hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r408044 - /jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java
Date Sat, 20 May 2006 17:26:48 GMT
Author: olegk
Date: Sat May 20 10:26:47 2006
New Revision: 408044

URL: http://svn.apache.org/viewvc?rev=408044&view=rev
Log:
Use thread safe HttpConnection#shutdown() instead of unsafe HttpConnection#close() as #destory()
can be called from a different thread

Modified:
    jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java

Modified: jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java?rev=408044&r1=408043&r2=408044&view=diff
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/src/java/org/apache/http/protocol/HttpService.java
Sat May 20 10:26:47 2006
@@ -196,7 +196,11 @@
     
     public void destroy() {
         this.destroyed = true;
-        closeConnection();
+        try {
+            this.conn.shutdown();
+        } catch (IOException ex) {
+            logIOException(ex);
+        }
     }
     
     public boolean isDestroyed() {



Mime
View raw message