mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-05 07:30:09 +08:00
Fix potential SvcReqMSFLoginNotify (OtherClient online) decode failure
This commit is contained in:
parent
3b6b7ad377
commit
1e55d15047
@ -11,6 +11,7 @@ package net.mamoe.mirai.internal.network.protocol.packet.login
|
||||
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.sync.withLock
|
||||
import kotlinx.io.core.ByteReadPacket
|
||||
import kotlinx.serialization.protobuf.ProtoBuf
|
||||
@ -255,7 +256,10 @@ internal class StatSvc {
|
||||
if (bot.otherClients.any { it.appId == appId }) return null
|
||||
|
||||
val info = Mirai.getOnlineOtherClientsList(bot).find { it.appId == appId }
|
||||
?: throw contextualBugReportException(
|
||||
?: kotlin.run {
|
||||
delay(1000) // sometimes server sync slow
|
||||
Mirai.getOnlineOtherClientsList(bot).find { it.appId == appId }
|
||||
} ?: throw contextualBugReportException(
|
||||
"SvcReqMSFLoginNotify (OtherClient online)",
|
||||
notify._miraiContentToString(),
|
||||
additional = "Failed to find corresponding instanceInfo."
|
||||
|
Loading…
Reference in New Issue
Block a user