mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-06 05:16:59 +03:00
retry auth step on fail
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
5cf7466e4c
commit
76a656a017
18 changed files with 138 additions and 86 deletions
|
|
@ -10,6 +10,7 @@
|
|||
#include "Logging.h"
|
||||
#include "minecraft/auth/Parsers.h"
|
||||
#include "net/Download.h"
|
||||
#include "net/NetJob.h"
|
||||
#include "net/StaticHeaderProxy.h"
|
||||
#include "tasks/Task.h"
|
||||
|
||||
|
|
@ -31,12 +32,15 @@ void EntitlementsStep::perform()
|
|||
{ "Authorization", QString("Bearer %1").arg(m_data->yggdrasilToken.token).toUtf8() } };
|
||||
|
||||
m_response.reset(new QByteArray());
|
||||
m_task = Net::Download::makeByteArray(url, m_response);
|
||||
m_task->addHeaderProxy(new Net::StaticHeaderProxy(headers));
|
||||
m_request = Net::Download::makeByteArray(url, m_response);
|
||||
m_request->addHeaderProxy(new Net::StaticHeaderProxy(headers));
|
||||
|
||||
m_task.reset(new NetJob("EntitlementsStep", APPLICATION->network()));
|
||||
m_task->setAskRetry(false);
|
||||
m_task->addNetAction(m_request);
|
||||
|
||||
connect(m_task.get(), &Task::finished, this, &EntitlementsStep::onRequestDone);
|
||||
|
||||
m_task->setNetwork(APPLICATION->network());
|
||||
m_task->start();
|
||||
qDebug() << "Getting entitlements...";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue