Skip to content

Commit 7c9384b

Browse files
authored
Change grpc.WithDialer to WithContextDialer
grpc.WithDialer has been deprecated.
1 parent b03c198 commit 7c9384b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cmd/client/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"net/http"
2828
"os"
2929
"os/signal"
30-
"time"
3130

3231
"github.com/spf13/cobra"
3332
"github.com/spf13/pflag"
@@ -252,7 +251,7 @@ func (c *Client) getUDSDialer(o *GrpcProxyClientOptions) (func(ctx context.Conte
252251

253252
switch o.mode {
254253
case "grpc":
255-
dialOption := grpc.WithDialer(func(string, time.Duration) (net.Conn, error) {
254+
dialOption := grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) {
256255
// Ignoring addr and timeout arguments:
257256
// addr - comes from the closure
258257
// timeout - is turned off as this is test code and eases debugging.

0 commit comments

Comments
 (0)