Skip to content

Commit

Permalink
Do not initialize remote clients if cluster not enabled (#2722)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxing1292 authored and yux0 committed Oct 28, 2019
1 parent 9d88fc7 commit b37db6b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/clientBean.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ func NewClientBean(factory Factory, dispatcherProvider DispatcherProvider, clust
remoteAdminClients := map[string]admin.Client{}
remoteFrontendClients := map[string]frontend.Client{}
for clusterName, info := range clusterMetadata.GetAllClusterInfo() {
if !info.Enabled {
continue
}

dispatcher, err := dispatcherProvider.Get(info.RPCName, info.RPCAddress)
if err != nil {
return nil, err
Expand Down

0 comments on commit b37db6b

Please sign in to comment.