[jboss-cvs] JBoss Messaging SVN: r7547 - trunk/src/main/org/jboss/messaging/integration/transports/netty.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jul 9 05:32:45 EDT 2009
Author: jmesnil
Date: 2009-07-09 05:32:44 -0400 (Thu, 09 Jul 2009)
New Revision: 7547
Modified:
trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java
Log:
added warning logs in NettyAcceptor::stop() if the channel groups are not completely closed
Modified: trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java 2009-07-09 07:49:14 UTC (rev 7546)
+++ trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java 2009-07-09 09:32:44 UTC (rev 7547)
@@ -26,6 +26,7 @@
import java.net.InetSocketAddress;
import java.net.SocketAddress;
+import java.util.Iterator;
import java.util.Map;
import java.util.Timer;
import java.util.concurrent.ConcurrentHashMap;
@@ -54,6 +55,7 @@
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.ChannelStateEvent;
import org.jboss.netty.channel.group.ChannelGroup;
+import org.jboss.netty.channel.group.ChannelGroupFuture;
import org.jboss.netty.channel.group.DefaultChannelGroup;
import org.jboss.netty.channel.local.DefaultLocalServerChannelFactory;
import org.jboss.netty.channel.local.LocalAddress;
@@ -367,7 +369,20 @@
if (!paused)
{
- serverChannelGroup.close().awaitUninterruptibly();
+ ChannelGroupFuture future = serverChannelGroup.close().awaitUninterruptibly();
+ if (!future.isCompleteSuccess())
+ {
+ log.warn("Server channel group did not completely close");
+ Iterator<Channel> iterator = future.getGroup().iterator();
+ while (iterator.hasNext())
+ {
+ Channel channel = (Channel)iterator.next();
+ if (channel.isBound())
+ {
+ log.warn(channel + " is still bound to " + channel.getLocalAddress());
+ }
+ }
+ }
}
if (httpKeepAliveTimer != null)
@@ -377,8 +392,22 @@
httpKeepAliveTimer.cancel();
}
- channelGroup.close().awaitUninterruptibly();
+ ChannelGroupFuture future = channelGroup.close().awaitUninterruptibly();
+ if (!future.isCompleteSuccess())
+ {
+ log.warn("channel group did not completely close");
+ Iterator<Channel> iterator = future.getGroup().iterator();
+ while (iterator.hasNext())
+ {
+ Channel channel = (Channel)iterator.next();
+ if (channel.isBound())
+ {
+ log.warn(channel + " is still connected to " + channel.getRemoteAddress());
+ }
+ }
+ }
+
channelFactory = null;
for (Connection connection : connections.values())
More information about the jboss-cvs-commits
mailing list