hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1630969 - /httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingNHttpClientConnectionManager.java
Date Fri, 10 Oct 2014 19:49:56 GMT
Author: olegk
Date: Fri Oct 10 19:49:55 2014
New Revision: 1630969

URL: http://svn.apache.org/r1630969
Log:
Work-around for a bug in NHttpConnectionBase#bind HttpCore 4.4-beta1 (to be removed)

Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingNHttpClientConnectionManager.java

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingNHttpClientConnectionManager.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingNHttpClientConnectionManager.java?rev=1630969&r1=1630968&r2=1630969&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingNHttpClientConnectionManager.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/PoolingNHttpClientConnectionManager.java
Fri Oct 10 19:49:55 2014
@@ -64,6 +64,7 @@ import org.apache.http.nio.pool.SocketAd
 import org.apache.http.nio.reactor.ConnectingIOReactor;
 import org.apache.http.nio.reactor.IOEventDispatch;
 import org.apache.http.nio.reactor.IOSession;
+import org.apache.http.nio.reactor.ssl.SSLIOSession;
 import org.apache.http.pool.ConnPoolControl;
 import org.apache.http.pool.PoolStats;
 import org.apache.http.protocol.HttpContext;
@@ -340,8 +341,13 @@ public class PoolingNHttpClientConnectio
             synchronized (managedConn) {
                 final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
                 final ManagedNHttpClientConnection conn = entry.getConnection();
-                final IOSession currentSession = sf.upgrade(host, conn.getIOSession());
+                final IOSession ioSession = conn.getIOSession();
+                final IOSession currentSession = sf.upgrade(host, ioSession);
                 conn.bind(currentSession);
+                // TODO: to be removed (work-around for a bug in HttpCore 4.4b1)
+                if (currentSession instanceof SSLIOSession) {
+                    ioSession.setBufferStatus((SSLIOSession) currentSession);
+                }
             }
         }
     }



Mime
View raw message