Skip to content

Commit c8359a5

Browse files
committed
Fixing Windows stuff
1 parent 560fb41 commit c8359a5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client_windows.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"context"
1111
"net"
1212
"time"
13+
"net/http"
1314

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

2728
// initializeNativeClient initializes the native Named Pipe client for Windows
28-
func (c *Client) initializeNativeClient() {
29+
func (c *Client) initializeNativeClient(trFunc func () *http.Transport) {
2930
if c.endpointURL.Scheme != namedPipeProtocol {
3031
return
3132
}
@@ -34,7 +35,7 @@ func (c *Client) initializeNativeClient() {
3435
timeout := namedPipeConnectTimeout
3536
return winio.DialPipe(namedPipePath, &timeout)
3637
}
37-
tr := defaultTransport()
38+
tr := trFunc()
3839
tr.Dial = dialFunc
3940
tr.DialContext = func(ctx context.Context, network, addr string) (net.Conn, error) {
4041
return dialFunc(network, addr)

0 commit comments

Comments
 (0)