Fix offline mode bugs
This commit is contained in:
@ -97,6 +97,10 @@ public: /* manipulation */
|
||||
*/
|
||||
std::shared_ptr<Task> login(QString password = QString());
|
||||
|
||||
void downgrade()
|
||||
{
|
||||
m_online = false;
|
||||
}
|
||||
public: /* queries */
|
||||
const QString &username() const
|
||||
{
|
||||
|
@ -78,7 +78,9 @@ void YggdrasilTask::processReply()
|
||||
{
|
||||
setStatus(getStateMessage(STATE_PROCESSING_RESPONSE));
|
||||
|
||||
if (m_netReply->error() == QNetworkReply::OperationCanceledError)
|
||||
// any network errors lead to offline mode right now
|
||||
if (m_netReply->error() >= QNetworkReply::ConnectionRefusedError &&
|
||||
m_netReply->error() <= QNetworkReply::UnknownNetworkError)
|
||||
{
|
||||
// WARNING/FIXME: the value here is used in MojangAccount to detect the cancel/timeout
|
||||
emitFailed("Yggdrasil task cancelled.");
|
||||
|
Reference in New Issue
Block a user