Timeout event in netty 4
- by user1819425
Hi I would like receive an event where messageReceived does not get called within an expected time. I tried with ReadTimeoutHandler where it generates exception where I can handle in exceptionCaught() where I would would do some work and return without closing the context. but right after that I got a bunch of exception
Nov 18, 2012 8:56:34 AM io.netty.channel.ChannelInitializer
WARNING: Failed to initialize a channel. Closing: [id: 0xa81de260, /127.0.0.1:59763 = /127.0.0.1:59724]
io.netty.channel.ChannelHandlerLifeCycleException: io.netty.handler.timeout.ReadTimeoutHandler is not a @Sharable handler, so can't be added or removed multiple times.
at io.netty.channel.DefaultChannelPipeline.callBeforeAdd(DefaultChannelPipeline.java:629)
at io.netty.channel.DefaultChannelPipeline.addLast0(DefaultChannelPipeline.java:173)
Am I doing correctly?
Thanks