You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by cr...@apache.org on 2022/07/14 02:37:00 UTC
[dubbo] branch 3.0 updated: Fix tri timeout not set (#10317)
This is an automated email from the ASF dual-hosted git repository.
crazyhzm 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 d35127954d Fix tri timeout not set (#10317)
d35127954d is described below
commit d35127954d6a0cac79381927807ae80b012a0672
Author: GuoHao <gu...@gmail.com>
AuthorDate: Thu Jul 14 10:36:53 2022 +0800
Fix tri timeout not set (#10317)
---
.../main/java/org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 6146fc6232..c6a534d333 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
@@ -305,8 +305,8 @@ public class TripleInvoker<T> extends AbstractInvoker<T> {
}
private int calculateTimeout(Invocation invocation, String methodName) {
- if (invocation.get(TIMEOUT_KEY) != null) {
- return (int) invocation.get(TIMEOUT_KEY);
+ if (invocation.getObjectAttachment(TIMEOUT_KEY) != null) {
+ return (int) invocation.getObjectAttachment(TIMEOUT_KEY);
}
Object countdown = RpcContext.getClientAttachment().getObjectAttachment(TIME_COUNTDOWN_KEY);
int timeout;