Skip to content

Commit

Permalink
v1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
SorkoPiko committed Sep 21, 2024
1 parent b07c142 commit 6ab203a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# No Rate Limit Changelog

## 1.0.4
* Added support for a new rate limit (20 downloadGJLevel per min)

## 1.0.3
* Fix Android bug. Sorry it took so long!

Expand Down
4 changes: 2 additions & 2 deletions src/managers/RequestStutter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ long long RequestStutter::getDownloadLevelTime() {
const auto maxReqs = Mod::get()->getSettingValue<int64_t>("maxDownloadLevelReqs");
const auto delay = 60 * 1000 / maxReqs;
const auto now = getCurrentTimestampMillis();
const auto nextRequestTime = lastDownloadLevelTime + delay;
lastDownloadLevelTime = std::max(nextRequestTime, now);
if (lastDownloadLevelTime < lastRequestTime) {
lastDownloadLevelTime = lastRequestTime;
}
const auto nextRequestTime = lastDownloadLevelTime + delay;
lastDownloadLevelTime = std::max(nextRequestTime, now);
log::info("{}", lastDownloadLevelTime - now);
return lastDownloadLevelTime - now;
}

0 comments on commit 6ab203a

Please sign in to comment.