Skip to content

Commit

Permalink
fix: add internal.UserSetDefaultScheme to clientconn.go
Browse files Browse the repository at this point in the history
  • Loading branch information
bruuuuuuuce committed Mar 1, 2024
1 parent 20d1967 commit 5b9e5d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,7 @@ func init() {
internal.ExitIdleModeForTesting = func(cc *ClientConn) error {
return cc.idlenessMgr.ExitIdleMode()
}
internal.UserSetDefaultScheme = resolver.GetDefaultScheme() != "dns"
}

func (cc *ClientConn) maybeApplyDefaultServiceConfig(addrs []resolver.Address) {
Expand Down
2 changes: 0 additions & 2 deletions resolver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ package resolver
import (
"context"
"fmt"
"google.golang.org/grpc/internal"
"net"
"net/url"
"strings"
Expand Down Expand Up @@ -70,7 +69,6 @@ func Get(scheme string) Builder {
// an init() function), and is not thread-safe. The scheme set last overrides
// previously set values.
func SetDefaultScheme(scheme string) {
internal.UserSetDefaultScheme = true
defaultScheme = scheme
}

Expand Down

0 comments on commit 5b9e5d3

Please # to comment.