use default 10000 for grpc port

This commit is contained in:
Chris Lu
2021-09-20 14:05:59 -07:00
parent fa7c65bd4b
commit 52fe86df45
6 changed files with 22 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ type ServerAddress string
type ServerAddresses string
func NewServerAddress(host string, port int, grpcPort int) ServerAddress {
if grpcPort == port+10000 {
if grpcPort == 0 || grpcPort == port+10000 {
return ServerAddress(util.JoinHostPort(host, port))
}
return ServerAddress(util.JoinHostPort(host, port) + "." + strconv.Itoa(grpcPort))