Browse Source

Fix invalid RateLimit event type

denverquane 4 years ago
parent
commit
e2c5d80fa6
1 changed files with 1 additions and 1 deletions
  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