Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

Update Lookup date only when ShouldExecute is true #14

Closed
xr1337 opened this issue Sep 29, 2015 · 1 comment
Closed

Update Lookup date only when ShouldExecute is true #14

xr1337 opened this issue Sep 29, 2015 · 1 comment

Comments

@xr1337
Copy link

xr1337 commented Sep 29, 2015

I was reading the class that implements the validation logic to run the rate limit.
While reading the class method below:

private class func shouldExecute(name name: String, limit: NSTimeInterval) -> Bool

I've notice the lookup date is updated regardless if 'should' is true or false.
I would expect the last executed date to be updated when the limit has passed. That way, subsequent request could refer to the original date instead of the last checked date.

Sorry for not making a pull request.

@xr1337 xr1337 closed this as completed Sep 29, 2015
@xr1337
Copy link
Author

xr1337 commented Sep 29, 2015

Closing as i see a pull request that fixes this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant