Skip to content

Commit f1d87c1

Browse files
authored
client: properly disable retry if GRPC_GO_RETRY=off (#4899)
1 parent 03753f5 commit f1d87c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/envconfig/envconfig.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ const (
3333
)
3434

3535
var (
36-
// Retry is set if retry is explicitly enabled via "GRPC_GO_RETRY=on" or if XDS retry support is enabled.
37-
Retry = strings.EqualFold(os.Getenv(retryStr), "on") || xdsenv.RetrySupport
36+
// Retry is enabled unless explicitly disabled via "GRPC_GO_RETRY=off" or
37+
// if XDS retry support is explicitly disabled.
38+
Retry = !strings.EqualFold(os.Getenv(retryStr), "off") && xdsenv.RetrySupport
3839
// TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
3940
TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false")
4041
)

0 commit comments

Comments
 (0)