mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
parent
201ac05943
commit
bd39748b5c
8 changed files with 131 additions and 143 deletions
|
@ -114,7 +114,7 @@ func (s *ServerStatistics) Failure() (time.Time, bool) {
|
|||
// a new backoff period. Increase the failure counter and
|
||||
// start a goroutine which will wait out the backoff and
|
||||
// unset the backoffStarted flag when done.
|
||||
if s.backoffStarted.CAS(false, true) {
|
||||
if s.backoffStarted.CompareAndSwap(false, true) {
|
||||
if s.backoffCount.Inc() >= s.statistics.FailuresUntilBlacklist {
|
||||
s.blacklisted.Store(true)
|
||||
if s.statistics.DB != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue