Skip to content

Commit

Permalink
Fix connect timeout dial opt to be old default
Browse files Browse the repository at this point in the history
  • Loading branch information
ajroetker committed May 23, 2023
1 parent e2785f3 commit cae6f72
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,13 @@ func (c *Client) getCCLocked(ctx context.Context, nsReceiver string) (*clientAnd
c.cs.Inc(numGRPCDial)

// Dial the destination.
conn, err := grpc.Dial(address, grpc.WithTransportCredentials(c.creds), grpc.WithConnectParams(grpc.ConnectParams{
Backoff: grpcBackoff.Config{MaxDelay: 20 * time.Second},
opt := grpc.WithInsecure()
if c.cfg.XDSCreds {
opt = grpc.WithTransportCredentials(c.creds)
}
conn, err := grpc.Dial(address, opt, grpc.WithConnectParams(grpc.ConnectParams{
Backoff: grpcBackoff.Config{MaxDelay: 20 * time.Second},
MinConnectTimeout: 20 * time.Second,
}))
if err != nil {
return nil, noID, err
Expand Down

0 comments on commit cae6f72

Please sign in to comment.