mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
feat: Auto handle Http 429 Too Many Requests with retry
- Must be explicitly enabled for a request - Uses Retry-After Header if present, falls back to exponential back off starting with 10 seconds - if retry delay is greater than 1 minute or it retries more than 3 times then fail with a "Rate Limited" reason - Sets task status to inform user of retry. Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
9171e2b2e1
commit
e8da9ee4fb
9 changed files with 75 additions and 3 deletions
|
|
@ -45,6 +45,7 @@ void XboxAuthorizationStep::perform()
|
|||
m_response.reset(new QByteArray());
|
||||
m_request = Net::Upload::makeByteArray(url, m_response.get(), xbox_auth_data.toUtf8());
|
||||
m_request->addHeaderProxy(std::make_unique<Net::RawHeaderProxy>(headers));
|
||||
m_request->enableAutoRetry(true);
|
||||
|
||||
m_task.reset(new NetJob("XboxAuthorizationStep", APPLICATION->network()));
|
||||
m_task->setAskRetry(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue