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 e6d19fcad8
commit 45278cb69e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -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 {