Add == nil to limit's check()

This commit is contained in:
Howl 2016-09-06 19:17:18 +02:00
parent c745947281
commit 6eda6aea87
1 changed files with 1 additions and 1 deletions

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)
}
}