Skip to content

Commit

Permalink
Fix unit test connection on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
blakerouse committed Oct 17, 2023
1 parent 11993fb commit abde993
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/control/v2/client/dial_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ package client
import (
"context"
"net"
"strings"

"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
Expand All @@ -27,5 +28,9 @@ func dialContext(ctx context.Context, address string, maxMsgSize int) (*grpc.Cli
}

func dialer(ctx context.Context, addr string) (net.Conn, error) {
if strings.HasPrefix(addr, "http://") {
var d net.Dialer
return d.DialContext(ctx, "tcp", strings.TrimPrefix(addr, "http://"))
}
return npipe.DialContext(addr)(ctx, "", "")
}

0 comments on commit abde993

Please sign in to comment.