We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opts := []triConfig.OptionFunction{ triConfig.WithClientTimeout(uint32(timeout.Seconds())), triConfig.WithCodecType(triCodecType), triConfig.WithLocation(url.Location), triConfig.WithHeaderAppVersion(url.GetParam(constant.AppVersionKey, "")), triConfig.WithHeaderGroup(url.GetParam(constant.GroupKey, "")), triConfig.WithLogger(logger.GetLogger()), } ms级别的timeout会被转化成秒级后,被uint32类型转化成0值
func (o *Option) Validate() { if o.Timeout == uint32(0) { o.Timeout = uint32(constant.DefaultTimeout) } ... } 0值被修改成默认的15s
What would you like to be added:
Why is this needed:
The text was updated successfully, but these errors were encountered:
我建议修改WithClientTimeout的参数类型会比较合理点
WithClientTimeout
Sorry, something went wrong.
No branches or pull requests
opts := []triConfig.OptionFunction{
triConfig.WithClientTimeout(uint32(timeout.Seconds())),
triConfig.WithCodecType(triCodecType),
triConfig.WithLocation(url.Location),
triConfig.WithHeaderAppVersion(url.GetParam(constant.AppVersionKey, "")),
triConfig.WithHeaderGroup(url.GetParam(constant.GroupKey, "")),
triConfig.WithLogger(logger.GetLogger()),
}
ms级别的timeout会被转化成秒级后,被uint32类型转化成0值
func (o *Option) Validate() {
if o.Timeout == uint32(0) {
o.Timeout = uint32(constant.DefaultTimeout)
}
...
}
0值被修改成默认的15s
What would you like to be added:
Why is this needed:
The text was updated successfully, but these errors were encountered: