directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r165086 - /directory/network/trunk/src/java/org/apache/mina/io/filter/SSLHandler.java
Date Thu, 28 Apr 2005 02:10:45 GMT
Author: trustin
Date: Wed Apr 27 19:10:44 2005
New Revision: 165086

URL: http://svn.apache.org/viewcvs?rev=165086&view=rev
Log:
Fixed: SSLException is thrown when a connection is closed while encrypting

Modified:
    directory/network/trunk/src/java/org/apache/mina/io/filter/SSLHandler.java

Modified: directory/network/trunk/src/java/org/apache/mina/io/filter/SSLHandler.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/io/filter/SSLHandler.java?rev=165086&r1=165085&r2=165086&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/io/filter/SSLHandler.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/io/filter/SSLHandler.java Wed Apr 27
19:10:44 2005
@@ -382,11 +382,18 @@
                 parent.debug.print( parent, "Wrap res:" + result );
             }
 
-            if ( result.getStatus() == SSLEngineResult.Status.OK ) {
+            if ( result.getStatus() == SSLEngineResult.Status.OK )
+            {
                 if ( result.getHandshakeStatus() == SSLEngineResult.HandshakeStatus.NEED_TASK
) {
                     doTasks();
                 }
-            } else {
+            }
+            else if( result.getStatus() == SSLEngineResult.Status.CLOSED )
+            {
+                closed = true;
+            }
+            else
+            {
                 throw new SSLException( "SSLEngine error during encrypt: "
                         + result.getStatus() +
                         " src: " + src + "outNetBuffer: " + outNetBuffer);



Mime
View raw message