Skip to content

Commit 59a2811

Browse files
committed
[Azure] cache map remove exists check
1 parent d6f44b0 commit 59a2811

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

staging/src/k8s.io/legacy-cloud-providers/azure/azure_vmss_cache.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ func (ss *scaleSet) newVMSSVirtualMachinesCache() (*azcache.TimedCache, error) {
173173
}
174174
localCache.Store(computerName, vmssVMCacheEntry)
175175

176-
if _, exists := oldCache[computerName]; exists {
177-
delete(oldCache, computerName)
178-
}
176+
delete(oldCache, computerName)
179177
}
180178
}
181179

0 commit comments

Comments
 (0)