From 67fee58eb7e90da89c346921664a691b359f8943 Mon Sep 17 00:00:00 2001 From: pantianying <601666418@qq.com> Date: Mon, 6 Jan 2020 17:14:23 +0800 Subject: [PATCH] merge code --- config/reference_config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/reference_config.go b/config/reference_config.go index 7b1358db4..157aaf18e 100644 --- a/config/reference_config.go +++ b/config/reference_config.go @@ -60,7 +60,7 @@ type ReferenceConfig struct { invoker protocol.Invoker urls []*common.URL Generic bool `yaml:"generic" json:"generic,omitempty" property:"generic"` - Sticky bool `yaml:"sticky" json:"sticky,omitempty" property:"sticky"` + Sticky bool `yaml:"sticky" json:"sticky,omitempty" property:"sticky"` RequestTimeout string `yaml:"timeout" json:"timeout,omitempty" property:"timeout"` } @@ -170,6 +170,9 @@ func (refconfig *ReferenceConfig) getUrlMap() url.Values { urlMap.Set(constant.VERSION_KEY, refconfig.Version) urlMap.Set(constant.GENERIC_KEY, strconv.FormatBool(refconfig.Generic)) urlMap.Set(constant.ROLE_KEY, strconv.Itoa(common.CONSUMER)) + if len(refconfig.RequestTimeout) != 0 { + urlMap.Set(constant.TIMEOUT_KEY, refconfig.RequestTimeout) + } //getty invoke async or sync urlMap.Set(constant.ASYNC_KEY, strconv.FormatBool(refconfig.async)) -- GitLab