mirror of https://github.com/kubernetes/kops.git
Add RLock() RUnlock() around map reads
This commit is contained in:
parent
dde44c37d8
commit
2be9f93d55
|
|
@ -121,7 +121,9 @@ func DefaultProject() (string, error) {
|
|||
}
|
||||
|
||||
func NewGCECloud(region string, project string, labels map[string]string) (GCECloud, error) {
|
||||
gceCloudInstancesMapMutex.RLock()
|
||||
i := gceCloudInstances[region+"::"+project]
|
||||
gceCloudInstancesMapMutex.RUnlock()
|
||||
if i != nil {
|
||||
return i.(gceCloudInternal).WithLabels(labels), nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue