[jboss-cvs] JBoss Messaging SVN: r4818 - trunk/src/main/org/jboss/messaging/core/remoting/impl/netty.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 18 05:43:08 EDT 2008


Author: trustin
Date: 2008-08-18 05:43:08 -0400 (Mon, 18 Aug 2008)
New Revision: 4818

Modified:
   trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnection.java
Log:
* Fixed a dead lock in NettyConnection 
* Proper SSL closure notify

Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnection.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnection.java	2008-08-18 09:38:49 UTC (rev 4817)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnection.java	2008-08-18 09:43:08 UTC (rev 4818)
@@ -25,6 +25,7 @@
 import org.jboss.messaging.core.remoting.MessagingBuffer;
 import org.jboss.messaging.core.remoting.spi.Connection;
 import org.jboss.netty.channel.Channel;
+import org.jboss.netty.channel.ChannelFutureListener;
 import org.jboss.netty.handler.ssl.SslHandler;
 
 /**
@@ -64,19 +65,19 @@
          return;
       }
 
-      channel.close().awaitUninterruptibly();
-
       SslHandler sslHandler = (SslHandler) channel.getPipeline().get("ssl");
       if (sslHandler != null)
       {
          try
          {
-            sslHandler.close(channel).awaitUninterruptibly();
+            sslHandler.close(channel).addListener(ChannelFutureListener.CLOSE);
          }
          catch (Throwable t)
          {
             // ignore
          }
+      } else {
+         channel.close();
       }
 
       closed = true;




More information about the jboss-cvs-commits mailing list