Skip to content

Commit

Permalink
fix: default defaultEndpointTemplate (#2535)
Browse files Browse the repository at this point in the history
  • Loading branch information
codyoss authored Apr 19, 2024
1 parent 67a5d6d commit 5a78abe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions transport/grpc/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,8 @@ func dialPoolNewAuth(ctx context.Context, secure bool, poolSize int, ds *interna
}

// Defaults for older clients that don't set this value yet
var defaultEndpointTemplate string
if ds.DefaultEndpointTemplate == "" {
defaultEndpointTemplate := ds.DefaultEndpointTemplate
if defaultEndpointTemplate == "" {
defaultEndpointTemplate = ds.DefaultEndpoint
}

Expand Down
4 changes: 2 additions & 2 deletions transport/http/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ func newClientNewAuth(ctx context.Context, ds *internal.DialSettings) (*http.Cli
}

// Defaults for older clients that don't set this value yet
var defaultEndpointTemplate string
if ds.DefaultEndpointTemplate == "" {
defaultEndpointTemplate := ds.DefaultEndpointTemplate
if defaultEndpointTemplate == "" {
defaultEndpointTemplate = ds.DefaultEndpoint
}

Expand Down

0 comments on commit 5a78abe

Please sign in to comment.