From 59a28111bea901b0559fc2297ab8d0f6d8b62ed0 Mon Sep 17 00:00:00 2001 From: Gaurav Singh Date: Mon, 20 Apr 2020 22:40:06 -0400 Subject: [PATCH] [Azure] cache map remove exists check --- .../k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go index 08be3add466..ab1e2d0e39d 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go @@ -173,9 +173,7 @@ func (ss *scaleSet) newVMSSVirtualMachinesCache() (*azcache.TimedCache, error) { } localCache.Store(computerName, vmssVMCacheEntry) - if _, exists := oldCache[computerName]; exists { - delete(oldCache, computerName) - } + delete(oldCache, computerName) } }