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
https://github.com/apache/dubbo-go/blob/main/protocol/rest/client/client_impl/resty_client.go#L59 err = c.SetDeadline(time.Now().Add(restOption.RequestTimeout)) http连接池复用tcp连接时,因为设置了deadline,resp未返回直接抛出io timeout。
err = c.SetDeadline(time.Now().Add(restOption.RequestTimeout))
The text was updated successfully, but these errors were encountered:
推荐调整为:
func NewRestyClient(restOption *client.RestOptions) client.RestClient { client := resty.New() client.SetTransport( &http.Transport{ DialContext: (&net.Dialer{ Timeout: restOption.ConnectTimeout, }).DialContext, IdleConnTimeout: 90 * time.Second, }).SetTimeout(restOption.RequestTimeout) return &RestyClient{ client: client, } }
Sorry, something went wrong.
No branches or pull requests
Environment
Issue description
https://github.com/apache/dubbo-go/blob/main/protocol/rest/client/client_impl/resty_client.go#L59
err = c.SetDeadline(time.Now().Add(restOption.RequestTimeout))
http连接池复用tcp连接时,因为设置了deadline,resp未返回直接抛出io timeout。
The text was updated successfully, but these errors were encountered: