mirror of https://github.com/minio/minio.git
Fix shared top locks client (#19018)
`client` is shared across goroutines. Seen with `mc support top locks` on minio built with `-race`.
This commit is contained in:
parent
035a3ea4ae
commit
6005ad3d48
|
@ -460,6 +460,7 @@ func (sys *NotificationSys) GetLocks(ctx context.Context, r *http.Request) []*Pe
|
||||||
g := errgroup.WithNErrs(len(sys.peerClients))
|
g := errgroup.WithNErrs(len(sys.peerClients))
|
||||||
for index, client := range sys.peerClients {
|
for index, client := range sys.peerClients {
|
||||||
index := index
|
index := index
|
||||||
|
client := client
|
||||||
g.Go(func() error {
|
g.Go(func() error {
|
||||||
if client == nil {
|
if client == nil {
|
||||||
return errPeerNotReachable
|
return errPeerNotReachable
|
||||||
|
|
Loading…
Reference in New Issue