mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
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))
|
||||
for index, client := range sys.peerClients {
|
||||
index := index
|
||||
client := client
|
||||
g.Go(func() error {
|
||||
if client == nil {
|
||||
return errPeerNotReachable
|
||||
|
Loading…
Reference in New Issue
Block a user