2

I use MyDecoder which extends ByteToMessageDecoder to get Message from the socket Stream. It works fine in one thread. But in more threads, the netty has reported 'the handler should be sharable' However, I search in netty api, the ByteToMessageDecoder can't be @sharable, so how can I use it in multi thread.

jackson
  • 23
  • 5

1 Answers1

2

Create a new instance in your ChannelInitializer.

Norman Maurer
  • 23,104
  • 2
  • 33
  • 31