Skip to content

Commit

Permalink
fix(monitor): status locked may be nil (#1677)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoryu committed Nov 26, 2021
1 parent d639abb commit 55cdb50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/monitor/util/cache/cache.go
Expand Up @@ -710,7 +710,7 @@ func (c *cacher) getDynamicClients(ctx context.Context) (util.ClusterSet,
clusterID := cc.ClusterName
resClusterCredentialSet[clusterID] = &clusterCredentials.Items[i]
if _, ok := resClusterSet[clusterID]; ok {
if resClusterSet[clusterID] != nil && *resClusterSet[clusterID].Status.Locked {
if resClusterSet[clusterID] != nil && resClusterSet[clusterID].Status.Locked != nil && *resClusterSet[clusterID].Status.Locked {
return resClusterSet, resClusterCredentialSet, resDynamicClientSet
}
restConfig := resClusterCredentialSet[clusterID].RESTConfig(resClusterSet[clusterID])
Expand Down

0 comments on commit 55cdb50

Please sign in to comment.