mirror of
https://github.com/minio/minio.git
synced 2025-02-28 13:59:15 -05:00
fix possible crash in bucket bandwidth monitor (#11986)
This commit is contained in:
parent
781b9b051c
commit
e3da59c923
@ -123,8 +123,12 @@ func (m *Monitor) getReport(selectBucket SelectionFunction) *bandwidth.Report {
|
|||||||
if !selectBucket(bucket) {
|
if !selectBucket(bucket) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
bucketThrottle, ok := m.bucketThrottle[bucket]
|
||||||
|
if !ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
report.BucketStats[bucket] = bandwidth.Details{
|
report.BucketStats[bucket] = bandwidth.Details{
|
||||||
LimitInBytesPerSecond: m.bucketThrottle[bucket].clusterBandwidth,
|
LimitInBytesPerSecond: bucketThrottle.clusterBandwidth,
|
||||||
CurrentBandwidthInBytesPerSecond: bucketMeasurement.getExpMovingAvgBytesPerSecond(),
|
CurrentBandwidthInBytesPerSecond: bucketMeasurement.getExpMovingAvgBytesPerSecond(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user