Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
denismakogon committed Jan 21, 2018
1 parent f6bd8f3 commit a8f5e91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ func NewVersionedClient(endpoint string, apiVersionString string) (*Client, erro
}

func (c *Client) WithTransport(tr *http.Transport) {
c.initializeNativeClientTransport(tr)
c.HTTPClient = &http.Client{Transport: tr}
initializeNativeClientTransport(c, tr)
c.HTTPClient.Transport = tr
}

// NewVersionnedTLSClient has been DEPRECATED, please use NewVersionedTLSClient.
Expand Down
4 changes: 2 additions & 2 deletions client_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ func (c *Client) initializeNativeClient() {
return
}
tr := defaultTransport()
c.initializeNativeClientTransport(tr)
initializeNativeClientTransport(c, tr)
}

func (c *Client) initializeNativeClientTransport(tr *http.Transport) {
func initializeNativeClientTransport(c *Client, tr *http.Transport) {
sockPath := c.endpointURL.Path
tr.Dial = func(network, addr string) (net.Conn, error) {
return c.Dialer.Dial(unixProtocol, sockPath)
Expand Down

0 comments on commit a8f5e91

Please sign in to comment.