Skip to content

Commit

Permalink
Make sure that we specify Backoff in conjunction with MinConnectTimeo…
Browse files Browse the repository at this point in the history
…ut, else we get a zero value. (hashicorp#19701)
  • Loading branch information
ncabatoff authored Mar 23, 2023
1 parent 449482d commit 0be6924
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vault/request_forwarding.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/hashicorp/vault/vault/replication"
"golang.org/x/net/http2"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/keepalive"
)

Expand Down Expand Up @@ -291,7 +292,10 @@ func (c *Core) refreshRequestForwardingConnection(ctx context.Context, clusterAd
),
}
if c.grpcMinConnectTimeout != 0 {
opts = append(opts, grpc.WithConnectParams(grpc.ConnectParams{MinConnectTimeout: c.grpcMinConnectTimeout}))
opts = append(opts, grpc.WithConnectParams(grpc.ConnectParams{
MinConnectTimeout: c.grpcMinConnectTimeout,
Backoff: backoff.DefaultConfig,
}))
}
c.rpcClientConn, err = grpc.DialContext(dctx, clusterURL.Host, opts...)
if err != nil {
Expand Down

0 comments on commit 0be6924

Please sign in to comment.