Browse Source

decode交由其他线程

FutureYu 1 year ago
parent
commit
ad42334cbb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      insert-app/src/main/java/db/netty/NettyServer.java

+ 1 - 1
insert-app/src/main/java/db/netty/NettyServer.java

@@ -98,7 +98,7 @@ public class NettyServer {
                     @Override
                     public void initChannel(final Channel ch) throws Exception {
                         ChannelPipeline p = ch.pipeline();
-                        p.addLast(encoder, decoder);
+                        p.addLast(workerGroup, encoder, decoder);
                         p.addLast(workerGroup, nettyServerHandler);
                     }
                 });