Browse Source

Fix ratelimit mutex with url parameters

jonas747 8 năm trước cách đây
mục cha
commit
a504a0adb9
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      restapi.go

+ 1 - 1
restapi.go

@@ -68,7 +68,7 @@ func (s *Session) request(method, urlStr, contentType string, b []byte) (respons
 	mu, _ = s.rateLimit.url[bu[0]]
 	if mu == nil {
 		mu = new(sync.Mutex)
-		s.rateLimit.url[urlStr] = mu
+		s.rateLimit.url[bu[0]] = mu
 	}
 	s.rateLimit.Unlock()