Fix plugin bug when DUBBO retries (#4187)

This commit is contained in:
tzy1316106836 2020-01-07 21:35:50 +08:00 committed by kezhenxu94
parent 1881a040d4
commit c6b169544e
2 changed files with 6 additions and 0 deletions

View File

@ -72,6 +72,9 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor {
while (next.hasNext()) {
next = next.next();
rpcContext.getAttachments().put(next.getHeadKey(), next.getHeadValue());
if (invocation.getAttachments().containsKey(next.getHeadKey())) {
invocation.getAttachments().remove(next.getHeadKey());
}
}
} else {
ContextCarrier contextCarrier = new ContextCarrier();

View File

@ -73,6 +73,9 @@ public class DubboInterceptor implements InstanceMethodsAroundInterceptor {
while (next.hasNext()) {
next = next.next();
rpcContext.getAttachments().put(next.getHeadKey(), next.getHeadValue());
if (invocation.getAttachments().containsKey(next.getHeadKey())) {
invocation.getAttachments().remove(next.getHeadKey());
}
}
} else {
ContextCarrier contextCarrier = new ContextCarrier();