mirror of
https://github.com/minio/minio.git
synced 2025-01-24 05:03:16 -05: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…
x
Reference in New Issue
Block a user