mirror of
https://github.com/minio/minio.git
synced 2025-03-30 17:23:42 -04:00
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 {
|
type targetsList struct {
|
||||||
list []Target
|
list []Target
|
||||||
mu *sync.RWMutex
|
mu sync.RWMutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func newTargetsList() *targetsList {
|
func newTargetsList() *targetsList {
|
||||||
return &targetsList{
|
return &targetsList{}
|
||||||
mu: &sync.RWMutex{},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (tl targetsList) get() []Target {
|
func (tl *targetsList) get() []Target {
|
||||||
tl.mu.RLock()
|
tl.mu.RLock()
|
||||||
defer tl.mu.RUnlock()
|
defer tl.mu.RUnlock()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user