Skip to content

Commit 5856d4f

Browse files
committed
remove author info from #1453
1 parent 42ba20e commit 5856d4f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/protocol/AbstractInvoker.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,15 @@ public Result invoke(Invocation inv) throws RpcException {
134134
if (attachment != null && attachment.size() > 0) {
135135
invocation.addAttachmentsIfAbsent(attachment);
136136
}
137-
Map<String, String> context = RpcContext.getContext().getAttachments();
138-
if (context != null) {
137+
Map<String, String> contextAttachments = RpcContext.getContext().getAttachments();
138+
if (contextAttachments != null) {
139139
/**
140140
* invocation.addAttachmentsIfAbsent(context){@link RpcInvocation#addAttachmentsIfAbsent(Map)}should not be used here,
141141
* because the {@link RpcContext#setAttachment(String, String)} is passed in the Filter when the call is triggered
142142
* by the built-in retry mechanism of the Dubbo. The attachment to update RpcContext will no longer work, which is
143143
* a mistake in most cases (for example, through Filter to RpcContext output traceId and spanId and other information).
144-
* yizhenqiang 20180310
145144
*/
146-
invocation.addAttachments(context);
145+
invocation.addAttachments(contextAttachments);
147146
}
148147
if (getUrl().getMethodParameter(invocation.getMethodName(), Constants.ASYNC_KEY, false)) {
149148
invocation.setAttachment(Constants.ASYNC_KEY, Boolean.TRUE.toString());

0 commit comments

Comments
 (0)