directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r354385 - /directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java
Date Tue, 06 Dec 2005 09:13:43 GMT
Author: trustin
Date: Tue Dec  6 01:13:41 2005
New Revision: 354385

URL: http://svn.apache.org/viewcvs?rev=354385&view=rev
Log:
Fixed another deadlock specified in DIRMINA-138 (Deadlock in SSLFilter)

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

Modified: directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java
URL: http://svn.apache.org/viewcvs/directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java?rev=354385&r1=354384&r2=354385&view=diff
==============================================================================
--- directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java (original)
+++ directory/network/trunk/src/java/org/apache/mina/filter/SSLFilter.java Tue Dec  6 01:13:41
2005
@@ -369,29 +369,26 @@
 
     public void sessionClosed( NextFilter nextFilter, IoSession session ) throws SSLException
     {
-        synchronized( session )
+        try
         {
-            if( !isSSLStarted( session ) )
+            synchronized( session )
             {
-                nextFilter.sessionClosed( session );
-                return;
-            }
-    
-            if( SessionLog.isDebugEnabled( session ) )
-            {
-                SessionLog.debug( session, " Closed: " + getSSLSessionHandler( session )
);
-            }
-            
-            // release resources
-            try
-            {
-                releaseSSLSessionHandler( session );
-            }
-            finally
-            {
-               // notify closed session
-               nextFilter.sessionClosed( session );
+                if( isSSLStarted( session ) )
+                {
+                    if( SessionLog.isDebugEnabled( session ) )
+                    {
+                        SessionLog.debug( session, " Closed: " + getSSLSessionHandler( session
) );
+                    }
+                
+                    // release resources
+                    releaseSSLSessionHandler( session );
+                }
             }
+        }
+        finally
+        {
+           // notify closed session
+           nextFilter.sessionClosed( session );
         }
     }
    



Mime
View raw message