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 123047d5b5
commit a6634db4a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}