Skip to content

Commit

Permalink
Add == nil to limit's check()
Browse files Browse the repository at this point in the history
  • Loading branch information
thehowl committed Sep 6, 2016
1 parent c745947 commit 6eda6ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion limit/limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 6eda6ae

Please sign in to comment.