Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: Improve rate limit algorithm for requests against the NVT API
The original algorithm was very simple by just applying a pause after a specific number of allowed requests. When doing additional costly tasks after each requests this algorithm results in unnecessary delays and the sleep might me completely obsolete. Therefore calculate the time since the last check for a sleep. If this time delta is within the rate limit we wait for the required time before doing the next request.
- Loading branch information