Return error if ServerAddresses is empty (#13714)

This commit is contained in:
Chris S. Kim 2022-07-12 11:09:00 -04:00 committed by GitHub
parent d25b025468
commit 9f5ab3ec10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -70,6 +70,9 @@ func (b *PeeringBackend) GetServerAddresses() ([]string, error) {
}
addrs = append(addrs, node.Address+":"+grpcPortStr)
}
if len(addrs) == 0 {
return nil, fmt.Errorf("a grpc bind port must be specified in the configuration for all servers")
}
return addrs, nil
}