fix:fix data race in rolling_counter used by bbr (#697)

pull/808/head
Taction 4 years ago committed by GitHub
parent 5e3df708d8
commit c99b1fdbcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/stat/metric/rolling_counter.go

@ -69,5 +69,7 @@ func (r *rollingCounter) Value() int64 {
} }
func (r *rollingCounter) Timespan() int { func (r *rollingCounter) Timespan() int {
r.policy.mu.RLock()
defer r.policy.mu.RUnlock()
return r.policy.timespan() return r.policy.timespan()
} }

Loading…
Cancel
Save