Skip to content

Commit

Permalink
fix region/grpc logic
Browse files Browse the repository at this point in the history
  • Loading branch information
felipejfc committed Mar 19, 2019
1 parent c33eb4e commit ab8f485
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cluster/grpc_rpc_client.go
Expand Up @@ -282,8 +282,8 @@ func (gs *GRPCClient) getServerHost(sv *Server) (host, portKey string) {
return internalHost, constants.GRPCPortKey
}

if gs.infoRetriever.Region() == serverRegion {
logger.Log.Infof("server %s is in same region, using internal host", sv.ID)
if gs.infoRetriever.Region() == serverRegion || !hasExternal {
logger.Log.Infof("server %s is in same region or external host not provided, using internal host", sv.ID)
return internalHost, constants.GRPCPortKey
}

Expand Down

0 comments on commit ab8f485

Please sign in to comment.