wenhongquan 1 год назад
Родитель
Сommit
9a181ce600

+ 4 - 0
ruoyi-common/ruoyi-common-web/pom.xml

@@ -44,6 +44,10 @@
         </dependency>
 
         <dependency>
+            <groupId>io.undertow</groupId>
+            <artifactId>undertow-servlet</artifactId>
+        </dependency>
+        <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>

+ 1 - 4
ruoyi-modules/ruoyi-khy/src/main/java/org/dromara/netty/Encode.java

@@ -39,7 +39,6 @@ public class Encode extends MessageToMessageEncoder {
             if(msg==null || StrUtil.isEmptyIfStr(msg)){
                 ByteBuf buf = Unpooled.copiedBuffer("".getBytes(CharsetUtil.UTF_8));
                 out.add(buf);
-                ctx.flush();
                 return;
             }
             if(msg instanceof DefaultAddressedEnvelope){
@@ -54,9 +53,7 @@ public class Encode extends MessageToMessageEncoder {
                 ByteBuf buf = Unpooled.copiedBuffer("".getBytes(CharsetUtil.UTF_8));
                 out.add(buf);
             }
-        }catch (Exception e){}finally {
-            ctx.flush();
-        }
+        }catch (Exception e){}
 
     }
 }