[jboss-cvs] JBoss Messaging SVN: r4846 - trunk/src/main/org/jboss/messaging/core/remoting/impl/netty.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 20 02:45:44 EDT 2008
Author: trustin
Date: 2008-08-20 02:45:44 -0400 (Wed, 20 Aug 2008)
New Revision: 4846
Modified:
trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnection.java
Log:
NettyConnection shouldn't block if it's a server-side connection
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-20 06:44:33 UTC (rev 4845)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/netty/NettyConnection.java 2008-08-20 06:45:44 UTC (rev 4846)
@@ -80,10 +80,13 @@
channel.close();
}
- // TODO Do not spin - use signal.
- MessagingChannelHandler handler = (MessagingChannelHandler) channel.getPipeline().get("handler");
- while (!handler.destroyed) {
- Thread.yield();
+ if (channel.getParent() == null) {
+ // A client channel - wait until everything is cleaned up.
+ // TODO Do not spin - use signal.
+ MessagingChannelHandler handler = (MessagingChannelHandler) channel.getPipeline().get("handler");
+ while (!handler.destroyed) {
+ Thread.yield();
+ }
}
closed = true;
More information about the jboss-cvs-commits
mailing list