Fix netty 4.1 tests (#2122)
This commit is contained in:
parent
cd1ad985d5
commit
8d6ee17c05
|
@ -90,13 +90,18 @@ public class NettyChannelPipelineInstrumentation implements TypeInstrumentation
|
||||||
public static void addHandler(
|
public static void addHandler(
|
||||||
@Advice.Enter int callDepth,
|
@Advice.Enter int callDepth,
|
||||||
@Advice.This ChannelPipeline pipeline,
|
@Advice.This ChannelPipeline pipeline,
|
||||||
@Advice.Argument(1) String name,
|
@Advice.Argument(1) String handlerName,
|
||||||
@Advice.Argument(2) ChannelHandler handler) {
|
@Advice.Argument(2) ChannelHandler handler) {
|
||||||
if (callDepth > 0) {
|
if (callDepth > 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CallDepthThreadLocalMap.reset(handler.getClass());
|
CallDepthThreadLocalMap.reset(handler.getClass());
|
||||||
|
|
||||||
|
String name = handlerName;
|
||||||
|
if (name == null) {
|
||||||
|
name = pipeline.context(handler).name();
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Server pipeline handlers
|
// Server pipeline handlers
|
||||||
if (handler instanceof HttpServerCodec) {
|
if (handler instanceof HttpServerCodec) {
|
||||||
|
|
Loading…
Reference in New Issue