Przeglądaj źródła

Halt bot when failed with `LoginFailedException`

Him188 5 lat temu
rodzic
commit
d584b765ab

+ 3 - 0
mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/QQAndroidClient.kt

@@ -139,6 +139,9 @@ internal open class QQAndroidClient(
                 throw it
             }
         }.getOrElse {
+            if (it is LoginFailedException) {
+                throw it
+            }
             bot.client.serverList.addAll(DefaultServerList)
             throw NoServerAvailableException(it)
         }