We have asynchronous processing here, hence
SimpleChannelInboundHandler's defaults are working against us.
Switch off autoRelease, hence we do not need to issue retain().
JIRA: NETCONF-1379
Change-Id: If4d86111c97122638f17bed52805468d2c3de240
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
private final RestconfRequestDispatcher dispatcher;
RestconfSession(final RestconfRequestDispatcher dispatcher) {
+ super(FullHttpRequest.class, false);
this.dispatcher = requireNonNull(dispatcher);
}
@Override
protected void channelRead0(final ChannelHandlerContext ctx, final FullHttpRequest msg) {
- dispatcher.dispatch(msg.retain(), new FutureCallback<>() {
+ dispatcher.dispatch(msg, new FutureCallback<>() {
@Override
public void onSuccess(final FullHttpResponse response) {
final var streamId = msg.headers().getInt(STREAM_ID);