From 26c86129c68109dafdfeb632e0ea15a53e1be7a5 Mon Sep 17 00:00:00 2001 From: Him188 Date: Sun, 2 Feb 2020 00:55:14 +0800 Subject: [PATCH] Less retry for friendlist --- .../mirai/qqandroid/network/QQAndroidBotNetworkHandler.kt | 7 ++----- .../network/protocol/packet/login/ConfigPushSvc.kt | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/QQAndroidBotNetworkHandler.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/QQAndroidBotNetworkHandler.kt index 6a09c78f9..8d7533a92 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/QQAndroidBotNetworkHandler.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/QQAndroidBotNetworkHandler.kt @@ -126,10 +126,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler 20, 0, 0 - ).sendAndExpect( - timeoutMillis = 8000, - retry = 5 - ) + ).sendAndExpect() totalFriendCount = data.totalFriendCount data.friendList.forEach { @@ -153,7 +150,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler bot.logger.info("开始加载组信息") val troopData = FriendList.GetTroopListSimplify( bot.client - ).sendAndExpect(10000) + ).sendAndExpect() println(troopData.contentToString()) } catch (e: Exception) { bot.logger.info("加载组信息失败|一般这是由于加载过于频繁导致/将以热加载方式加载群列表") diff --git a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/ConfigPushSvc.kt b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/ConfigPushSvc.kt index d340809bb..4572beb45 100644 --- a/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/ConfigPushSvc.kt +++ b/mirai-core-qqandroid/src/commonMain/kotlin/net/mamoe/mirai/qqandroid/network/protocol/packet/login/ConfigPushSvc.kt @@ -27,7 +27,7 @@ internal class ConfigPushSvc { network.run { buildOutgoingUniPacket( client, - sequenceId = client.configPushSvcPushReqSequenceId.also { println("configPushSvcPushReqSequenceId=${client.configPushSvcPushReqSequenceId}") }, + sequenceId = client.configPushSvcPushReqSequenceId, commandName = "ConfigPushSvc.PushResp", name = "ConfigPushSvc.PushResp" ) {