fix: should call func globalOSMetrics.time(s)() when updateOSMetrics (#18209)

This commit is contained in:
jiuker
2023-10-12 15:08:13 +08:00
committed by GitHub
parent 6829ae5b13
commit 000928d34e
3 changed files with 4 additions and 3 deletions

View File

@@ -105,7 +105,8 @@ func osTrace(s osMetric, startTime time.Time, duration time.Duration, path strin
func updateOSMetrics(s osMetric, paths ...string) func(err error) {
if globalTrace.NumSubscribers(madmin.TraceOS) == 0 {
return func(err error) { globalOSMetrics.time(s) }
osAction := globalOSMetrics.time(s)
return func(err error) { osAction() }
}
startTime := time.Now()