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

This commit is contained in:
cskh 2022-10-11 10:56:29 -04:00 committed by GitHub
parent 2bb2846790
commit e0356e1502
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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