File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import (
27
27
28
28
"github.com/golang/protobuf/ptypes/wrappers"
29
29
"google.golang.org/grpc"
30
+ "google.golang.org/grpc/credentials/insecure"
30
31
"google.golang.org/grpc/metadata"
31
32
32
33
"github.com/polarismesh/polaris-limiter/apiserver"
@@ -104,7 +105,10 @@ func startHeartbeat(ctx context.Context) {
104
105
func doWithPolarisClient (handle func (polaris.PolarisGRPCClient ) error ) error {
105
106
ctx , cancel := context .WithCancel (context .Background ())
106
107
defer cancel ()
107
- conn , err := grpc .DialContext (ctx , polarisServerAddress , grpc .WithInsecure ())
108
+ var opts []grpc.DialOption
109
+ opts = append (opts , grpc .WithTransportCredentials (insecure .NewCredentials ()))
110
+
111
+ conn , err := grpc .DialContext (ctx , polarisServerAddress , opts ... )
108
112
if err != nil {
109
113
return err
110
114
}
You can’t perform that action at this time.
0 commit comments