mirror of
https://github.com/linka-cloud/grpc.git
synced 2026-01-07 18:44:05 +00:00
fix(client): use wireguard-go pipe implementation until CL299009 is resolved
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@@ -6,13 +6,13 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"net"
|
"net"
|
||||||
|
|
||||||
"github.com/Microsoft/go-winio"
|
"golang.zx2c4.com/wireguard/ipc/namedpipe"
|
||||||
)
|
)
|
||||||
|
|
||||||
func dial(ctx context.Context, addr string) (net.Conn, error) {
|
func dial(ctx context.Context, addr string) (net.Conn, error) {
|
||||||
network, address := parseDialTarget(addr)
|
network, address := parseDialTarget(addr)
|
||||||
if network == "pipe" {
|
if network == "pipe" {
|
||||||
return winio.DialPipeContext(ctx, address)
|
return namedpipe.DialContext(ctx, address)
|
||||||
}
|
}
|
||||||
return (&net.Dialer{}).DialContext(ctx, network, address)
|
return (&net.Dialer{}).DialContext(ctx, network, address)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user