mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-06 08:00:10 +08:00
Ensure fast login succeed, fix #1199
This commit is contained in:
parent
09475efbda
commit
6d58fb5514
@ -244,10 +244,10 @@ internal class QQAndroidBotNetworkHandler(coroutineContext: CoroutineContext, bo
|
||||
|
||||
private val fastLoginOrSendPacketLock = Mutex()
|
||||
|
||||
private suspend fun doFastLogin(): Boolean {
|
||||
private suspend fun doFastLogin() {
|
||||
fastLoginOrSendPacketLock.withLock {
|
||||
val login10 = WtLogin10(bot.client).sendAndExpect(ignoreLock = true)
|
||||
return login10 is WtLogin.Login.LoginPacketResponse.Success
|
||||
check(login10 is WtLogin.Login.LoginPacketResponse.Success) { "Fast login failed: $login10" }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user