Add check for zero-length server addresses

This commit is contained in:
Chris S. Kim 2022-08-24 13:30:52 -04:00
parent 81e965479b
commit 5f2959329f
1 changed files with 4 additions and 1 deletions

View File

@ -833,7 +833,10 @@ func (m *subscriptionManager) subscribeServerAddrs(
serverAddrs = append(serverAddrs, grpcAddr)
}
// TODO(peering): handle empty addresses here?
if len(serverAddrs) == 0 {
m.logger.Warn("did not find any server addresses with external gRPC ports to publish")
continue
}
updateCh <- cache.UpdateEvent{
CorrelationID: subServerAddrs,