Explorar o código

Fix invalid RateLimit event type

denverquane %!s(int64=4) %!d(string=hai) anos
pai
achega
e2c5d80fa6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      restapi.go

+ 1 - 1
restapi.go

@@ -155,7 +155,7 @@ func (s *Session) RequestWithLockedBucket(method, urlStr, contentType string, b
 			return
 		}
 		s.log(LogInformational, "Rate Limiting %s, retry in %d", urlStr, rl.RetryAfter)
-		s.handleEvent(rateLimitEventType, RateLimit{TooManyRequests: &rl, URL: urlStr})
+		s.handleEvent(rateLimitEventType, &RateLimit{TooManyRequests: &rl, URL: urlStr})
 
 		time.Sleep(rl.RetryAfter * time.Millisecond)
 		// we can make the above smarter