Skip to content

Commit

Permalink
fix:maxCallAttempts default values
Browse files Browse the repository at this point in the history
  • Loading branch information
No-SilverBullet committed Jul 4, 2024
1 parent bdd707e commit 0fa5e9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ func NewClient(target string, opts ...DialOption) (conn *ClientConn, err error)
}

if cc.dopts.defaultServiceConfigRawJSON != nil {
if cc.dopts.maxCallAttempts == 0 {
cc.dopts.maxCallAttempts = defaultMaxCallAttempts
}
scpr := parseServiceConfig(*cc.dopts.defaultServiceConfigRawJSON, cc.dopts.maxCallAttempts)
if scpr.Err != nil {
return nil, fmt.Errorf("%s: %v", invalidDefaultServiceConfigErrPrefix, scpr.Err)
Expand Down

0 comments on commit 0fa5e9e

Please sign in to comment.