Browse Source

优化数据接收逻辑。

tomatozq 5 năm trước cách đây
mục cha
commit
2ff799ac9f

+ 3 - 4
lapi/src/main/java/com/jpsoft/smart/lapi/handler/PersonVerificationHandler.java

@@ -53,12 +53,11 @@ public class PersonVerificationHandler extends SimpleChannelInboundHandler<Perso
 
     @Override
     protected void channelRead0(ChannelHandlerContext ctx, PersonVerification personVerification) throws Exception {
-        log.warn("===人员记录 begin===");
-        asyncWork(ctx,personVerification);
-        log.warn("===人员记录 end===");
+        new Thread(()->{
+            asyncWork(ctx,personVerification);
+        }).start();
     }
 
-    @Async
     public void asyncWork(ChannelHandlerContext ctx,PersonVerification personVerification) {
         log.warn("===人员记录异步处理 begin===");