cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] git commit: Clean up the NettyHttpServer shutdown code
Date Thu, 24 Jul 2014 08:27:33 GMT
Clean up the NettyHttpServer shutdown code


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/26efeeae
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/26efeeae
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/26efeeae

Branch: refs/heads/3.0.x-fixes
Commit: 26efeeae05ffd54051458f30583fc516e5712a03
Parents: 66dd802
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Thu Jul 24 16:24:40 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Thu Jul 24 16:26:51 2014 +0800

----------------------------------------------------------------------
 .../http/netty/server/NettyHttpServletPipelineFactory.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/26efeeae/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
----------------------------------------------------------------------
diff --git a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
index 1b2c812..d185aa8 100644
--- a/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
+++ b/rt/transports/http-netty/netty-server/src/main/java/org/apache/cxf/transport/http/netty/server/NettyHttpServletPipelineFactory.java
@@ -47,14 +47,14 @@ import io.netty.handler.ssl.SslHandler;
 import io.netty.handler.timeout.IdleStateHandler;
 import io.netty.util.concurrent.DefaultEventExecutorGroup;
 import io.netty.util.concurrent.EventExecutorGroup;
-import io.netty.util.concurrent.GlobalEventExecutor;
+import io.netty.util.concurrent.ImmediateEventExecutor;
 
 public class NettyHttpServletPipelineFactory extends ChannelInitializer<Channel> {
     private static final Logger LOG =
         LogUtils.getL7dLogger(NettyHttpServletPipelineFactory.class);
     
-    //TODO how to manage the allChannels
-    private final ChannelGroup allChannels = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);;
+    //Holds the child channel
+    private final ChannelGroup allChannels = new DefaultChannelGroup(ImmediateEventExecutor.INSTANCE);;
 
     private final HttpSessionWatchdog watchdog;
     
@@ -111,7 +111,7 @@ public class NettyHttpServletPipelineFactory extends ChannelInitializer<Channel>
     }
     
     public void shutdown() {
-        allChannels.close();
+        allChannels.close().awaitUninterruptibly();
         watchdog.stopWatching();
         applicationExecutor.shutdownGracefully();
     }


Mime
View raw message