Skip to content

Commit

Permalink
Merge 92ee51c into 103cf14
Browse files Browse the repository at this point in the history
  • Loading branch information
Threadalive committed Jul 29, 2021
2 parents 103cf14 + 92ee51c commit 5b65850
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion protocol/dubbo/dubbo_invoker.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,11 @@ func (di *DubboInvoker) Invoke(ctx context.Context, invocation protocol.Invocati

// get timeout including methodConfig
func (di *DubboInvoker) getTimeout(invocation *invocation_impl.RPCInvocation) time.Duration {
timeout := di.GetURL().GetParam(strings.Join([]string{constant.METHOD_KEYS, invocation.MethodName(), constant.TIMEOUT_KEY}, "."), "")
methodName := invocation.MethodName()
if di.GetURL().GetParamBool(constant.GENERIC_KEY, false) {
methodName = invocation.Arguments()[0].(string)
}
timeout := di.GetURL().GetParam(strings.Join([]string{constant.METHOD_KEYS, methodName, constant.TIMEOUT_KEY}, "."), "")
if len(timeout) != 0 {
if t, err := time.ParseDuration(timeout); err == nil {
// config timeout into attachment
Expand Down

0 comments on commit 5b65850

Please sign in to comment.