Skip to content

Commit 295b057

Browse files
authored
Merge pull request #18 from chuntaojun/fix_docker_deploy
fix:polaris-limiter connect polaris-server
2 parents f08ee73 + cee67a2 commit 295b057

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bootstrap/registry.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727

2828
"github.com/golang/protobuf/ptypes/wrappers"
2929
"google.golang.org/grpc"
30+
"google.golang.org/grpc/credentials/insecure"
3031
"google.golang.org/grpc/metadata"
3132

3233
"github.com/polarismesh/polaris-limiter/apiserver"
@@ -104,7 +105,10 @@ func startHeartbeat(ctx context.Context) {
104105
func doWithPolarisClient(handle func(polaris.PolarisGRPCClient) error) error {
105106
ctx, cancel := context.WithCancel(context.Background())
106107
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...)
108112
if err != nil {
109113
return err
110114
}

0 commit comments

Comments
 (0)