File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,13 @@ func (cm *PollingProjectConfigManager) SyncConfig(datafile []byte) {
100
100
projectConfig , err := datafileprojectconfig .NewDatafileProjectConfig (datafile )
101
101
102
102
cm .configLock .Lock ()
103
- defer func () {
103
+ closeMutex := func () {
104
104
cm .err = err
105
105
cm .configLock .Unlock ()
106
- }()
106
+ }
107
107
if err != nil {
108
108
cmLogger .Error ("failed to create project config" , err )
109
+ closeMutex ()
109
110
return
110
111
}
111
112
@@ -115,10 +116,12 @@ func (cm *PollingProjectConfigManager) SyncConfig(datafile []byte) {
115
116
}
116
117
if projectConfig .GetRevision () == previousRevision {
117
118
cmLogger .Debug (fmt .Sprintf ("No datafile updates. Current revision number: %s" , cm .projectConfig .GetRevision ()))
119
+ closeMutex ()
118
120
return
119
121
}
120
122
cmLogger .Debug (fmt .Sprintf ("New datafile set with revision: %s. Old revision: %s" , projectConfig .GetRevision (), previousRevision ))
121
123
cm .projectConfig = projectConfig
124
+ closeMutex ()
122
125
123
126
if cm .notificationCenter != nil {
124
127
projectConfigUpdateNotification := notification.ProjectConfigUpdateNotification {
You can’t perform that action at this time.
0 commit comments