This is an automated email from the ASF dual-hosted git repository.
albumenj 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 b19f89bef7 Fix issue #11790 (#11824)
b19f89bef7 is described below
commit b19f89bef76b234ea0f80710356b0e9aae6a301a
Author: Mengyang Tang <[email protected]>
AuthorDate: Thu Mar 16 09:49:00 2023 +0800
Fix issue #11790 (#11824)
---
.../main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
index 99f235385b..1bff438b27 100644
---
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
+++
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
@@ -29,6 +29,7 @@ import org.apache.dubbo.rpc.FutureContext;
import org.apache.dubbo.rpc.Invocation;
import org.apache.dubbo.rpc.Invoker;
import org.apache.dubbo.rpc.Result;
+import org.apache.dubbo.rpc.RpcContext;
import org.apache.dubbo.rpc.RpcException;
import org.apache.dubbo.rpc.RpcInvocation;
import org.apache.dubbo.rpc.protocol.AbstractInvoker;
@@ -103,6 +104,9 @@ public class DubboInvoker<T> extends AbstractInvoker<T> {
}
invocation.setAttachment(TIMEOUT_KEY, String.valueOf(timeout));
+
+
RpcContext.getServiceContext().setRemoteAddress(currentClient.getRemoteAddress());
+
if (isOneway) {
boolean isSent = getUrl().getMethodParameter(methodName,
Constants.SENT_KEY, false);
currentClient.send(inv, isSent);