mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 10:56:57 +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>
(cherry picked from commit e8da9ee4fb)
This commit is contained in:
parent
930cf828c4
commit
d7793caa90
9 changed files with 75 additions and 3 deletions
|
|
@ -69,6 +69,7 @@ void MSADeviceCodeStep::perform()
|
|||
m_response.reset(new QByteArray());
|
||||
m_request = Net::Upload::makeByteArray(url, m_response, payload);
|
||||
m_request->addHeaderProxy(new Net::RawHeaderProxy(headers));
|
||||
m_request->enableAutoRetry(true);
|
||||
|
||||
m_task.reset(new NetJob("MSADeviceCodeStep", APPLICATION->network()));
|
||||
m_task->setAskRetry(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue