ChannelHandlerContext.writeAndFlush(Object, ChannelPromise). promise.addListener(ChannelFutureListener.CLOSE); ChannelHandlerContext.write(Object, ChannelPromise).Interesting. Could you instead add a listener on the future returned from writeAndFlush?
Can you share the stacktrace of the NPE? close should be idempotent or at least throw a more specific exception.
Jonathan--
You received this message because you are subscribed to the Google Groups "Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netty+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netty/ec9374c8-6616-43dc-9fb6-0ec540687e0c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Client pipeline caught an exception
java.lang.NullPointerException
at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController.maxUsableChannelBytes(DefaultHttp2RemoteFlowController.java:238)
at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController.writableBytes(DefaultHttp2RemoteFlowController.java:250)
at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController.access$900(DefaultHttp2RemoteFlowController.java:43)
at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController$WritabilityMonitor.writePendingBytes(DefaultHttp2RemoteFlowController.java:627)
at io.netty.handler.codec.http2.DefaultHttp2RemoteFlowController.writePendingBytes(DefaultHttp2RemoteFlowController.java:255)
at io.netty.handler.codec.http2.Http2ConnectionHandler.flush(Http2ConnectionHandler.java:161)
at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:786)
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:812)
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:824)
at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:804)
Could you instead add a listener on the future returned fromwriteAndFlush?