1
0
mirror of https://github.com/mamoe/mirai.git synced 2025-04-14 23:20:49 +08:00

[core] Don't reconnect if error in onSolveSliderCaptcha

This commit is contained in:
Karlatemp 2022-11-15 18:18:57 +08:00
parent 85bf607b60
commit 90f2fee243
No known key found for this signature in database
GPG Key ID: BA173CA2B9956C59

View File

@ -298,15 +298,7 @@ internal class SsoProcessorImpl(
// use solver
val ticket = try {
loginSolverNotNull().onSolveSliderCaptcha(bot, response.url)?.takeIf { it.isNotEmpty() }
} catch (e: LoginFailedException) {
collectThrow(e)
} catch (error: Throwable) {
if (allowSlider) {
collectException(error)
allowSlider = false
response = WtLogin9(client, allowSlider).sendAndExpect()
continue@mainloop
}
collectThrow(error)
}
response = if (ticket == null) {