Fix netty 4.1 tests (#2122)

This commit is contained in:
Lauri Tulmin 2021-01-26 20:11:06 +02:00 committed by GitHub
parent cd1ad985d5
commit 8d6ee17c05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -90,13 +90,18 @@ public class NettyChannelPipelineInstrumentation implements TypeInstrumentation
public static void addHandler(
@Advice.Enter int callDepth,
@Advice.This ChannelPipeline pipeline,
@Advice.Argument(1) String name,
@Advice.Argument(1) String handlerName,
@Advice.Argument(2) ChannelHandler handler) {
if (callDepth > 0) {
return;
}
CallDepthThreadLocalMap.reset(handler.getClass());
String name = handlerName;
if (name == null) {
name = pipeline.context(handler).name();
}
try {
// Server pipeline handlers
if (handler instanceof HttpServerCodec) {