tests: Protect globalLocalDrives against races (#16800)

This commit is contained in:
Klaus Post
2023-03-13 06:04:20 -07:00
committed by GitHub
parent cde7eeb660
commit 628042e65e
4 changed files with 25 additions and 2 deletions

View File

@@ -156,7 +156,9 @@ func newErasureServerPools(ctx context.Context, endpointServerPools EndpointServ
break
}
globalLocalDrivesMu.Lock()
globalLocalDrives = localDrives
defer globalLocalDrivesMu.Unlock()
return z, nil
}