mirror of
https://github.com/minio/minio
synced 2024-07-08 19:56:05 +00:00
fix: delete globalProfiler should lock (#16697)
This commit is contained in:
parent
e05f3d5d84
commit
6e8960ccdd
|
@ -803,6 +803,8 @@ func (a adminAPIHandlers) ProfileHandler(w http.ResponseWriter, r *http.Request)
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
globalProfilerMu.Lock()
|
||||||
|
defer globalProfilerMu.Unlock()
|
||||||
for k, v := range globalProfiler {
|
for k, v := range globalProfiler {
|
||||||
v.Stop()
|
v.Stop()
|
||||||
delete(globalProfiler, k)
|
delete(globalProfiler, k)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user