Kaynağa Gözat

延长超时时间

zjs 1 hafta önce
ebeveyn
işleme
c5e61eebbd

+ 3 - 3
src/main/java/com/cn/esermis/netty/BootNettyChannelInitializer.java

@@ -14,11 +14,11 @@ import java.util.concurrent.TimeUnit;
14 14
 public class BootNettyChannelInitializer<SocketChannel>extends ChannelInitializer<Channel> {
15 15
 
16 16
     //注意超时时间,这里配置,最好设置长点,要不代码 会自动关连接。这里是60秒
17
-    public static long READ_TIME_OUT = 60;
17
+    public static long READ_TIME_OUT = 60*30;
18 18
 
19
-    public static long WRITE_TIME_OUT = 60;
19
+    public static long WRITE_TIME_OUT = 60*30;
20 20
 
21
-    public static long ALL_TIME_OUT = 60;
21
+    public static long ALL_TIME_OUT = 60*30;
22 22
 
23 23
     @Override
24 24
     protected void initChannel(Channel ch) throws Exception {