Add == nil to limit's check()
This commit is contained in:
parent
c745947281
commit
6eda6aea87
|
@ -108,7 +108,7 @@ func (s *RateLimiter) check() {
|
||||||
if s.Map == nil {
|
if s.Map == nil {
|
||||||
s.Map = make(map[string]chan struct{})
|
s.Map = make(map[string]chan struct{})
|
||||||
}
|
}
|
||||||
if s.Mutex {
|
if s.Mutex == nil {
|
||||||
s.Mutex = new(sync.RWMutex)
|
s.Mutex = new(sync.RWMutex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user