Skip to content

Commit

Permalink
Fixing Windows stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
denismakogon committed Jan 21, 2018
1 parent 560fb41 commit c8359a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"context"
"net"
"time"
"net/http"

"github.com/Microsoft/go-winio"
)
Expand All @@ -25,7 +26,7 @@ func (p pipeDialer) Dial(network, address string) (net.Conn, error) {
}

// initializeNativeClient initializes the native Named Pipe client for Windows
func (c *Client) initializeNativeClient() {
func (c *Client) initializeNativeClient(trFunc func () *http.Transport) {
if c.endpointURL.Scheme != namedPipeProtocol {
return
}
Expand All @@ -34,7 +35,7 @@ func (c *Client) initializeNativeClient() {
timeout := namedPipeConnectTimeout
return winio.DialPipe(namedPipePath, &timeout)
}
tr := defaultTransport()
tr := trFunc()
tr.Dial = dialFunc
tr.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
return dialFunc(network, addr)
Expand Down

0 comments on commit c8359a5

Please sign in to comment.