mirror of
https://github.com/minio/minio
synced 2024-09-29 20:54:33 +00:00
Fix crash on /minio/metrics/v3?list (#19745)
An unchecked map access was causing panic.
This commit is contained in:
parent
6d3e0c7db6
commit
c05ca63158
|
@ -105,8 +105,8 @@ func (h *metricsV3Server) listMetrics(path string) http.Handler {
|
|||
if collPath.isDescendantOf(path) {
|
||||
if v, ok := h.metricsData.mgMap[collPath]; ok {
|
||||
matchingMG[collPath] = v
|
||||
} else {
|
||||
matchingMG[collPath] = h.metricsData.bucketMGMap[collPath]
|
||||
} else if v, ok := h.metricsData.bucketMGMap[collPath]; ok {
|
||||
matchingMG[collPath] = v
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue