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

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


The following commit(s) were added to refs/heads/3.0 by this push:
     new 6f116fd  Fix triple protocol async call (#9870)
6f116fd is described below

commit 6f116fd8b15341923b142a8df94476570f9a24cb
Author: huazhongming <[email protected]>
AuthorDate: Thu Mar 31 19:34:36 2022 +0800

    Fix triple protocol async call (#9870)
    
    * fix triple protocol async call
    
    * Fix format
    
    Co-authored-by: guohao <[email protected]>
---
 .../main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java
 
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java
index 49b6794..ef0afe5 100644
--- 
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java
+++ 
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java
@@ -193,6 +193,9 @@ public class TripleInvoker<T> extends AbstractInvoker<T> {
         final AsyncRpcResult result;
         DeadlineFuture future = DeadlineFuture.newFuture(getUrl().getPath(),
             methodDescriptor.getMethodName(), getUrl().getAddress(), timeout, 
callbackExecutor);
+
+        RequestMetadata request = createRequest(methodDescriptor, invocation, 
timeout);
+
         final Object pureArgument;
         if (methodDescriptor.getParameterClasses().length == 2
             && methodDescriptor.getParameterClasses()[1].isAssignableFrom(
@@ -224,7 +227,7 @@ public class TripleInvoker<T> extends AbstractInvoker<T> {
             FutureContext.getContext().setCompatibleFuture(future);
         }
         ClientCall.Listener callListener = new UnaryClientCallListener(future);
-        RequestMetadata request = createRequest(methodDescriptor, invocation, 
timeout);
+
         final StreamObserver<Object> requestObserver = call.start(request, 
callListener);
         requestObserver.onNext(pureArgument);
         requestObserver.onCompleted();

Reply via email to