mirror of https://github.com/minio/minio.git
race: Fix detected test race in the internal audit code (#19865)
This commit is contained in:
parent
a8554c4022
commit
3ba857dfa1
|
@ -45,16 +45,14 @@ type Target interface {
|
|||
|
||||
type targetsList struct {
|
||||
list []Target
|
||||
mu *sync.RWMutex
|
||||
mu sync.RWMutex
|
||||
}
|
||||
|
||||
func newTargetsList() *targetsList {
|
||||
return &targetsList{
|
||||
mu: &sync.RWMutex{},
|
||||
}
|
||||
return &targetsList{}
|
||||
}
|
||||
|
||||
func (tl targetsList) get() []Target {
|
||||
func (tl *targetsList) get() []Target {
|
||||
tl.mu.RLock()
|
||||
defer tl.mu.RUnlock()
|
||||
|
||||
|
|
Loading…
Reference in New Issue