Skip to content

Commit

Permalink
fix(discovery): defer should be unlock
Browse files Browse the repository at this point in the history
  • Loading branch information
SOF3 committed Jan 8, 2025
1 parent 595dd1f commit f753491
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/k8s/discovery/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func (cdc *clusterDiscoveryCache) run(ctx context.Context) {

func (cdc *clusterDiscoveryCache) doResync() {
cdc.resyncCv.L.Lock()
defer cdc.resyncCv.L.Lock()
defer cdc.resyncCv.L.Unlock()

if cdc.isDoingResync {
// wait for isDoingResync to be set to false by other goroutines
Expand Down

0 comments on commit f753491

Please sign in to comment.