File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -324,10 +324,12 @@ func (kcm *KubeConfigManager) handleBatchConfigEvent(obj config.Event) {
324
324
return
325
325
}
326
326
327
+ // Lock to read known checksums and update config.
328
+ kcm .m .Lock ()
329
+ defer kcm .m .Unlock ()
330
+
327
331
if obj .Key == "" {
328
332
// Config backend was reset
329
- kcm .m .Lock ()
330
- defer kcm .m .Unlock ()
331
333
kcm .currentConfig = config .NewConfig ()
332
334
kcm .configEventCh <- config.KubeConfigEvent {
333
335
Type : config .KubeConfigChanged ,
@@ -337,10 +339,6 @@ func (kcm *KubeConfigManager) handleBatchConfigEvent(obj config.Event) {
337
339
338
340
newConfig := obj .Config
339
341
340
- // Lock to read known checksums and update config.
341
- kcm .m .Lock ()
342
- defer kcm .m .Unlock ()
343
-
344
342
globalChanged := kcm .isGlobalChanged (newConfig )
345
343
346
344
// Parse values in module sections, create new ModuleConfigs and checksums map.
You can’t perform that action at this time.
0 commit comments