Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 Timeout waiting for ConfigPush. 掉线问题 #2834

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -56,4 +57,4 @@ internal class ConfigPushProcessorImpl(
}
}

}
}
Loading