micronaut-core
micronaut-core copied to clipboard
Netty DefaultHttpClient logs "BUG - Handler not removed" after adding logbook
Expected Behavior
I have added the logbook client handler to the netty pipeline as per documented at https://docs.micronaut.io/latest/guide/#nettyClientPipeline
It properly logs the request/response, but started to see this WARN level log messages: [client-nioEventLoopGroup-4-1] WARN i.m.h.client.netty.DefaultHttpClient - BUG - Handler not removed: ChannelHandlerContext[logbook, [id: 0x34d2..., L:/ipAddress:port - R:domain/ipAddress:port])
I have tried to find the in the micronaut code base where that log message could come from, but didn't find it.
Actual Behaviour
No response
Steps To Reproduce
- Create an HTTP client annotated with micronaut's @Client
- Add the LogbookNettyClientCustomizer as per the documentation: https://docs.micronaut.io/latest/guide/#nettyClientPipeline
- Call the method of the HTTP Client
Environment Information
JDK 17
Example Application
https://docs.micronaut.io/latest/guide/#nettyClientPipeline
Version
4.3.6
annoying. it needs to stay in onRequestPipelineBuilt for http2 but has to go into onStreamPipelineBuilt for http1. and it may break entirely in a future update where i replace pipeliningserverhandler for http2. the perils of messing with the handler pipeline directly