This is an automated email from the ASF dual-hosted git repository.

earthchen pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.1 by this push:
     new 3c68e9476e Fixes #11044,solve remoteApplicationName is null, in mesh 
mode with t… (#11058)
3c68e9476e is described below

commit 3c68e9476e1c418f50608897472e1b313eb6bc94
Author: gold-fisher <[email protected]>
AuthorDate: Thu Dec 1 18:07:42 2022 +0800

    Fixes #11044,solve remoteApplicationName is null, in mesh mode with t… 
(#11058)
    
    * Fixes #11044,solve remoteApplicationName is null, in mesh mode with 
triple protocol.
---
 .../apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java  | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java
 
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java
index 98748e25f1..61de32a9ba 100644
--- 
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java
+++ 
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java
@@ -31,6 +31,7 @@ import 
org.apache.dubbo.rpc.protocol.tri.observer.ServerCallToObserverAdapter;
 import java.net.InetSocketAddress;
 
 import static 
org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_TIMEOUT_SERVER;
+import static 
org.apache.dubbo.common.constants.CommonConstants.REMOTE_APPLICATION_KEY;
 
 public abstract class AbstractServerCallListener implements 
AbstractServerCall.Listener {
 
@@ -57,6 +58,7 @@ public abstract class AbstractServerCallListener implements 
AbstractServerCall.L
             .remove(TripleHeaderEnum.CONSUMER_APP_NAME_KEY);
         if (null != remoteApp) {
             RpcContext.getServerContext().setRemoteApplicationName(remoteApp);
+            invocation.setAttachmentIfAbsent(REMOTE_APPLICATION_KEY, 
remoteApp);
         }
         final long stInMillis = System.currentTimeMillis();
         try {

Reply via email to