fix(peering): add missing grpc_tls_port for server address reconciliation (#14944)

pull/14746/head
cskh 2 years ago committed by GitHub
parent 2bb2846790
commit e0356e1502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -310,6 +310,14 @@ func (r *ReadyServersEventPublisher) getGRPCPort(srv *autopilot.ServerState) int
if err != nil || ns == nil || ns.Meta == nil {
return 0
}
if str, ok := ns.Meta["grpc_tls_port"]; ok {
grpcPort, err := strconv.Atoi(str)
if err == nil {
return grpcPort
}
}
if str, ok := ns.Meta["grpc_port"]; ok {
grpcPort, err := strconv.Atoi(str)
if err == nil {

Loading…
Cancel
Save