mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-17 16:28:41 +08:00
读超时时间设置为30s
This commit is contained in:
@@ -24,8 +24,8 @@ public class NettyServerChannelInitializer extends ChannelInitializer<SocketChan
|
|||||||
// pipeline.addLast("frameDecoder", new YkcProtocolDecoder());
|
// pipeline.addLast("frameDecoder", new YkcProtocolDecoder());
|
||||||
pipeline.addLast("decoder", new ByteArrayDecoder());
|
pipeline.addLast("decoder", new ByteArrayDecoder());
|
||||||
pipeline.addLast("encoder", new ByteArrayDecoder());
|
pipeline.addLast("encoder", new ByteArrayDecoder());
|
||||||
//读超时时间设置为15s,0表示不监控
|
// 读超时时间设置为30s,0表示不监控
|
||||||
pipeline.addLast(new IdleStateHandler(15, 0, 0, TimeUnit.SECONDS));
|
pipeline.addLast(new IdleStateHandler(30, 0, 0, TimeUnit.SECONDS));
|
||||||
pipeline.addLast("handler", nettyServerHandler);
|
pipeline.addLast("handler", nettyServerHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user