提交 c6b16954 编写于 作者: T tzy1316106836 提交者: kezhenxu94

Fix plugin bug when DUBBO retries (#4187)

上级 1881a040
...@@ -72,6 +72,9 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor { ...@@ -72,6 +72,9 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor {
while (next.hasNext()) { while (next.hasNext()) {
next = next.next(); next = next.next();
rpcContext.getAttachments().put(next.getHeadKey(), next.getHeadValue()); rpcContext.getAttachments().put(next.getHeadKey(), next.getHeadValue());
if (invocation.getAttachments().containsKey(next.getHeadKey())) {
invocation.getAttachments().remove(next.getHeadKey());
}
} }
} else { } else {
ContextCarrier contextCarrier = new ContextCarrier(); ContextCarrier contextCarrier = new ContextCarrier();
......
...@@ -73,6 +73,9 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor { ...@@ -73,6 +73,9 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor {
while (next.hasNext()) { while (next.hasNext()) {
next = next.next(); next = next.next();
rpcContext.getAttachments().put(next.getHeadKey(), next.getHeadValue()); rpcContext.getAttachments().put(next.getHeadKey(), next.getHeadValue());
if (invocation.getAttachments().containsKey(next.getHeadKey())) {
invocation.getAttachments().remove(next.getHeadKey());
}
} }
} else { } else {
ContextCarrier contextCarrier = new ContextCarrier(); ContextCarrier contextCarrier = new ContextCarrier();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册