diff --git a/config/reference_config.go b/config/reference_config.go index 7b1358db4394a27318b313d2262ade1da704e22f..157aaf18eff751d0db60bdb7f8297b0aacd8107b 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))