diff options
author | Andrew <forkk@forkk.net> | 2013-12-09 12:06:33 -0600 |
---|---|---|
committer | Andrew <forkk@forkk.net> | 2013-12-09 12:06:33 -0600 |
commit | 712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d (patch) | |
tree | 3a525b7e4488a7ea03521ddff33800ef81f92f07 /logic/auth | |
parent | 7f52bed9e3f559adcbcf3f3c1c7ac2251964db8c (diff) | |
parent | b0dbd4f4afcf60e4021cbb3218bfe280c4989859 (diff) | |
download | MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.gz MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.lz MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.tar.xz MultiMC-712b87c643bbd7bc4ed2cfd459d0b9fdb69e5f0d.zip |
Merge branch 'develop' of github.com:MultiMC/MultiMC5 into develop
Diffstat (limited to 'logic/auth')
-rw-r--r-- | logic/auth/MojangAccount.h | 4 | ||||
-rw-r--r-- | logic/auth/YggdrasilTask.cpp | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/logic/auth/MojangAccount.h b/logic/auth/MojangAccount.h index 8c44ce58..95f777ce 100644 --- a/logic/auth/MojangAccount.h +++ b/logic/auth/MojangAccount.h @@ -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 { diff --git a/logic/auth/YggdrasilTask.cpp b/logic/auth/YggdrasilTask.cpp index 6b938ea7..45155058 100644 --- a/logic/auth/YggdrasilTask.cpp +++ b/logic/auth/YggdrasilTask.cpp @@ -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."); |