mirror of
https://github.com/go-kratos/kratos.git
synced 2025-01-24 03:46:37 +02:00
fix:fix data race in rolling_counter used by bbr (#697)
This commit is contained in:
parent
5e3df708d8
commit
c99b1fdbcb
@ -69,5 +69,7 @@ func (r *rollingCounter) Value() int64 {
|
||||
}
|
||||
|
||||
func (r *rollingCounter) Timespan() int {
|
||||
r.policy.mu.RLock()
|
||||
defer r.policy.mu.RUnlock()
|
||||
return r.policy.timespan()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user