1. Brodie Rao
  2. django-piston-oauth2

Commits

Brodie Rao  committed df4ad5b Merge
  • Participants
  • Parent commits ac4277e, 6f1b896
  • Branches default

Comments (0)

Files changed (1)

File piston/utils.py

View file
             now = time.time()
             count, expiration = cache.get(ident, (1, None))
 
-            if expiration is None:
+            if expiration is None or expiration < now:
+                count = 1  # reset count
                 expiration = now + timeout
 
             if count >= max_requests and expiration > now: