Merge pull request #39673 from thaJeztah/fix_client_HTTPClient

fix client.HTTPClient() not returning a copy
This commit is contained in:
Yong Tang 2019-08-06 06:33:08 -07:00 committed by GitHub
commit ecdb0b2239
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,7 +252,8 @@ func (cli *Client) DaemonHost() string {
// HTTPClient returns a copy of the HTTP client bound to the server
func (cli *Client) HTTPClient() *http.Client {
return &*cli.client
c := *cli.client
return &c
}
// ParseHostURL parses a url string, validates the string is a host url, and