Ian Ferreira
Ian Ferreira

Reputation: 1

Writes in Netty 4.0.4.Final using the SimpleChannelInboundHandler does not work anymore

I have upgraded my Netty lib from 4.0.0.CR9 to 4.0.4.Final yesterday only to discover the interfaces has changed again. The method messageReceived does not exist anymore, or being replaced with a channelRead0 method. In my server-side app I read a json, do some bi, and at the end of the method write some json back to the client. Trying the some now in channelRead0 I have the following problem:- It now seem stuck in the ChannelFuture.operationComplete that never gets called. It only goes into the operationComplete once I stopped/close the client.

Upvotes: 0

Views: 904

Answers (1)

Norman Maurer
Norman Maurer

Reputation: 23557

Use Channel.writeAndFlush(...) or call Channel.flush() explicitly . This is stated in the release notes of 4.0.0.Final.

Upvotes: 2

Related Questions