Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/clientconfignextgen_lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func ReleaseTanzuConfigNextGenLock() {
if cfgNextGenLock == nil {
return
}
if errUnlock := cfgNextGenLock.Unlock(); errUnlock != nil {
if errUnlock := cfgNextGenLock.Close(); errUnlock != nil {
panic(fmt.Sprintf("cannot release lock for tanzu config file, reason: %v", errUnlock))
}

Expand Down
4 changes: 2 additions & 2 deletions config/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func ReleaseTanzuConfigLock() {
if tanzuConfigLock == nil {
return
}
if errUnlock := tanzuConfigLock.Unlock(); errUnlock != nil {
if errUnlock := tanzuConfigLock.Close(); errUnlock != nil {
panic(fmt.Sprintf("cannot release lock for tanzu config file, reason: %v", errUnlock))
}

Expand Down Expand Up @@ -103,7 +103,7 @@ func getFileLockWithTimeOut(lockPath string, lockDuration time.Duration) (*filem
select {
case <-cancel:
// Timed out, cleanup if necessary.
_ = flock.Unlock()
_ = flock.Close()
case result <- err:
}
}()
Expand Down
2 changes: 1 addition & 1 deletion config/metadata_lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func ReleaseTanzuMetadataLock() {
if tanzuMetadataLock == nil {
return
}
if errUnlock := tanzuMetadataLock.Unlock(); errUnlock != nil {
if errUnlock := tanzuMetadataLock.Close(); errUnlock != nil {
panic(fmt.Sprintf("cannot release lock for tanzu config metadata file, reason: %v", errUnlock))
}

Expand Down