Browse Source

Add == nil to limit's check()

oauth2
Morgan Bazalgette 3 years ago
parent
commit
6eda6aea87
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      limit/limit.go

+ 1
- 1
limit/limit.go View File

@@ -108,7 +108,7 @@ func (s *RateLimiter) check() {
if s.Map == nil {
s.Map = make(map[string]chan struct{})
}
if s.Mutex {
if s.Mutex == nil {
s.Mutex = new(sync.RWMutex)
}
}


Loading…
Cancel
Save