mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Enable multiple concurrent profile types (#8792)
This commit is contained in:
@@ -28,8 +28,12 @@ func handleSignals() {
|
||||
// Custom exit function
|
||||
exit := func(success bool) {
|
||||
// If global profiler is set stop before we exit.
|
||||
if globalProfiler != nil {
|
||||
globalProfiler.Stop()
|
||||
globalProfilerMu.Lock()
|
||||
defer globalProfilerMu.Unlock()
|
||||
if len(globalProfiler) > 0 {
|
||||
for _, p := range globalProfiler {
|
||||
p.Stop()
|
||||
}
|
||||
}
|
||||
|
||||
if success {
|
||||
|
||||
Reference in New Issue
Block a user