Log SSL errors, give common solutions
This commit is contained in:
parent
027aafc3c1
commit
8d0ca72abb
6 changed files with 64 additions and 5 deletions
|
@ -865,6 +865,8 @@ void MainWindow::doLaunch()
|
|||
if (!account.get())
|
||||
return;
|
||||
|
||||
QString failReason = tr("Your account is currently not logged in. Please enter "
|
||||
"your password to log in again.");
|
||||
// do the login. if the account has an access token, try to refresh it first.
|
||||
if (account->accountStatus() != NotVerified)
|
||||
{
|
||||
|
@ -879,13 +881,28 @@ void MainWindow::doLaunch()
|
|||
{
|
||||
updateInstance(m_selectedInstance, account);
|
||||
}
|
||||
// revert from online to verified.
|
||||
else
|
||||
{
|
||||
if (!task->successful())
|
||||
{
|
||||
failReason = task->failReason();
|
||||
}
|
||||
if (loginWithPassword(account, failReason))
|
||||
updateInstance(m_selectedInstance, account);
|
||||
}
|
||||
// in any case, revert from online to verified.
|
||||
account->downgrade();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (loginWithPassword(account, failReason))
|
||||
{
|
||||
updateInstance(m_selectedInstance, account);
|
||||
account->downgrade();
|
||||
}
|
||||
// in any case, revert from online to verified.
|
||||
account->downgrade();
|
||||
return;
|
||||
}
|
||||
if (loginWithPassword(account, tr("Your account is currently not logged in. Please enter "
|
||||
"your password to log in again.")))
|
||||
updateInstance(m_selectedInstance, account);
|
||||
}
|
||||
|
||||
bool MainWindow::loginWithPassword(MojangAccountPtr account, const QString &errorMsg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue