Fix grpc.Dial usage in sshpiperd (#436)
* Fix grpc.Dial usage in sshpiperd * fix dns not found * Update dependencies in go.mod and go.sum files * Refactor grpc.NewClient to remove unnecessary grpc.WithBlock() option
This commit is contained in:
parent
57d0e21787
commit
08d0e23d60
4 changed files with 31 additions and 37 deletions
|
|
@ -576,7 +576,8 @@ func DialCmd(cmd *exec.Cmd) (*CmdPlugin, error) {
|
|||
ch <- cmd.Wait()
|
||||
}()
|
||||
|
||||
conn, err := grpc.Dial("", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(func(_ context.Context, _ string) (net.Conn, error) {
|
||||
// this dummy 127.0.0.1 is not used
|
||||
conn, err := grpc.NewClient("127.0.0.1", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(func(_ context.Context, _ string) (net.Conn, error) {
|
||||
return cmdconn, nil
|
||||
}))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue