hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1660138 - /httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
Date Mon, 16 Feb 2015 15:24:08 GMT
Author: olegk
Date: Mon Feb 16 15:24:08 2015
New Revision: 1660138

URL: http://svn.apache.org/r1660138
Log:
Supress IOException thrown by Socket#setSoLinger in BHttpConnectionBase#shutdown method

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java?rev=1660138&r1=1660137&r2=1660138&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/BHttpConnectionBase.java
Mon Feb 16 15:24:08 2015
@@ -216,8 +216,12 @@ class BHttpConnectionBase implements BHt
         final Socket socket = this.socketHolder.getAndSet(null);
         if (socket != null) {
             // force abortive close (RST)
-            socket.setSoLinger(true, 0);
-            socket.close();
+            try {
+                socket.setSoLinger(true, 0);
+            } catch (IOException ex) {
+            } finally {
+                socket.close();
+            }
         }
     }
 



Mime
View raw message