Closed huangzhen1201 closed 5 years ago
channel.pipeline().addLast(new IdleStateHandler(5,5,10, TimeUnit.SECONDS))
IdleStateHandler的读时间和写时间必须要填,不然会导致心跳报错,正在传输数据时关闭通道报错
你好,这三个参数分别是”读idel“、"写idel"和"读+写idel"的idel时间,只填写读+写位置参数时可以的。
channel.pipeline().addLast(new IdleStateHandler(5,5,10, TimeUnit.SECONDS))
IdleStateHandler的读时间和写时间必须要填,不然会导致心跳报错,正在传输数据时关闭通道报错