Browse Source

Add == nil to limit's check()

oauth2
Morgan Bazalgette 2 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() {
108 108
 	if s.Map == nil {
109 109
 		s.Map = make(map[string]chan struct{})
110 110
 	}
111
-	if s.Mutex {
111
+	if s.Mutex == nil {
112 112
 		s.Mutex = new(sync.RWMutex)
113 113
 	}
114 114
 }

Loading…
Cancel
Save