mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 23:36:18 +08:00
Merge pull request #249 from gravitl/hotfix_v0.7.2_082021
fixed ext peers
This commit is contained in:
commit
808079a7d5
|
@ -281,7 +281,7 @@ func GetPeers(macaddress string, network string, server string, dualstack bool,
|
|||
if err == nil {
|
||||
peers = append(peers, extPeers...)
|
||||
} else {
|
||||
log.Println("ERROR RETRIEVING EXTERNAL PEERS")
|
||||
log.Println("ERROR RETRIEVING EXTERNAL PEERS",err)
|
||||
}
|
||||
}
|
||||
return peers, hasGateway, gateways, err
|
||||
|
@ -297,7 +297,13 @@ func GetExtPeers(macaddress string, network string, server string, dualstack boo
|
|||
nodecfg := cfg.Node
|
||||
|
||||
requestOpts := grpc.WithInsecure()
|
||||
if cfg.Server.GRPCSSL == "on" {
|
||||
h2creds := credentials.NewTLS(&tls.Config{NextProtos: []string{"h2"}})
|
||||
requestOpts = grpc.WithTransportCredentials(h2creds)
|
||||
}
|
||||
|
||||
conn, err := grpc.Dial(server, requestOpts)
|
||||
|
||||
if err != nil {
|
||||
log.Fatalf("Unable to establish client connection to localhost:50051: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue