diff --git a/cmd/common/conn/conn.go b/cmd/common/conn/conn.go index e31b8513b..aacf09611 100644 --- a/cmd/common/conn/conn.go +++ b/cmd/common/conn/conn.go @@ -29,6 +29,7 @@ func init() { grpcOptionFailOnNonTempDialError, grpcOptionConnError, grpcInterceptors, + grpcOptionTLS, ) } diff --git a/cmd/common/conn/tls.go b/cmd/common/conn/tls.go index 36d2ff15e..ec9773a17 100644 --- a/cmd/common/conn/tls.go +++ b/cmd/common/conn/tls.go @@ -18,10 +18,6 @@ import ( "google.golang.org/grpc/credentials" ) -func init() { - GRPCOptionFuncs = append(GRPCOptionFuncs, grpcOptionTLS) -} - func grpcOptionTLS(vp *viper.Viper) (grpc.DialOption, error) { target := vp.GetString(config.KeyServer) if !(vp.GetBool(config.KeyTLS) || strings.HasPrefix(target, defaults.TargetTLSPrefix)) {