Skip to content

Commit

Permalink
do not overwrite the tunnel dialer
Browse files Browse the repository at this point in the history
  • Loading branch information
karimra committed May 9, 2024
1 parent 39e6631 commit dd6d1a6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/api/target/target.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ func (t *Target) CreateGNMIClient(ctx context.Context, opts ...grpc.DialOption)
go func(addr string) {
timeoutCtx, cancel := context.WithTimeout(ctx, t.Config.Timeout)
defer cancel()
opts = append(opts, grpc.WithContextDialer(t.createDialer(addr)))

// add the local custom dialer only if the target is a not tunneled.
if t.Config.TunnelTargetType == "" {
opts = append(opts, grpc.WithContextDialer(t.createDialer(addr)))
}
conn, err := grpc.DialContext(timeoutCtx, addr, opts...)
if err != nil {
errC <- fmt.Errorf("%s: %v", addr, err)
Expand Down

0 comments on commit dd6d1a6

Please sign in to comment.