You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2011/07/22 23:19:13 UTC

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

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) {