hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1149742 - /httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
Date Fri, 22 Jul 2011 21:19:13 GMT
Author: olegk
Date: Fri Jul 22 21:19:12 2011
New Revision: 1149742

URL: http://svn.apache.org/viewvc?rev=1149742&view=rev
Log:
HTTPCORE-266: SSLIOSession does not correctly terminate if the opposite end shuts down connection
without sending 'close notify' message causing an infinite loop in the I/O dispatch thread

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java?rev=1149742&r1=1149741&r2=1149742&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/SSLIOSession.java
Fri Jul 22 21:19:12 2011
@@ -199,8 +199,8 @@ public class SSLIOSession implements IOS
     }
 
     private void updateEventMask() {
-        if (this.status == CLOSING &&
-                this.sslEngine.isInboundDone() && this.sslEngine.isOutboundDone())
{
+        if (this.status == CLOSING && this.sslEngine.isOutboundDone()
+                && (this.endOfStream || this.sslEngine.isInboundDone())) {
             this.status = CLOSED;
         }
         if (this.status == CLOSED) {



Mime
View raw message