From b7eb6eb88da42f5b70912c40d268cc4461556ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=80=A1=E7=84=B6?= <63996691+zhaodice@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:51:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20Timeout=20waiting=20for=20?= =?UTF-8?q?ConfigPush.=20=E6=8E=89=E7=BA=BF=E9=97=AE=E9=A2=98=20(#2834)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/network/components/ConfigPushProcessor.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mirai-core/src/commonMain/kotlin/network/components/ConfigPushProcessor.kt b/mirai-core/src/commonMain/kotlin/network/components/ConfigPushProcessor.kt index cfcf49d4d6..c6dc395819 100644 --- a/mirai-core/src/commonMain/kotlin/network/components/ConfigPushProcessor.kt +++ b/mirai-core/src/commonMain/kotlin/network/components/ConfigPushProcessor.kt @@ -16,6 +16,7 @@ import net.mamoe.mirai.event.globalEventChannel import net.mamoe.mirai.event.nextEvent import net.mamoe.mirai.internal.network.component.ComponentKey import net.mamoe.mirai.internal.network.handler.NetworkHandler +import net.mamoe.mirai.internal.network.handler.selector.NetworkException import net.mamoe.mirai.internal.network.protocol.packet.login.ConfigPushSvc import net.mamoe.mirai.utils.MiraiLogger import net.mamoe.mirai.utils.warning @@ -42,7 +43,7 @@ internal class ConfigPushProcessorImpl( if (resp == null) { val bdhSyncer = network.context[BdhSessionSyncer] if (!bdhSyncer.hasSession) { - val e = IllegalStateException("Timeout waiting for ConfigPush.") + val e = NetworkException("Timeout waiting for ConfigPush.",true) bdhSyncer.bdhSession.completeExceptionally(e) logger.warning { "Missing ConfigPush. Switching server..." } network.context[SsoProcessor].casFirstLoginResult(null, FirstLoginResult.CHANGE_SERVER) @@ -56,4 +57,4 @@ internal class ConfigPushProcessorImpl( } } -} \ No newline at end of file +}