Commit 79426f3b authored by Him188's avatar Him188

Add coroutineScope

parent 224b8058
......@@ -155,11 +155,11 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
val friendLoadFinish = currentTimeMillis
val groupInfo = mutableMapOf<Long, Int>()
coroutineScope {
try {
bot.logger.info("开始加载群组列表与群成员列表")
val troopListData = FriendList.GetTroopListSimplify(
bot.client
).sendAndExpect<FriendList.GetTroopListSimplify.Response>(timeoutMillis = 5000)
val troopListData = FriendList.GetTroopListSimplify(bot.client)
.sendAndExpect<FriendList.GetTroopListSimplify.Response>(timeoutMillis = 5000, retry = 2)
// println("获取到群数量" + troopData.groups.size)
val toGet: MutableMap<GroupImpl, ContactList<Member>> = mutableMapOf()
troopListData.groups.forEach {
......@@ -211,7 +211,7 @@ internal class QQAndroidBotNetworkHandler(bot: QQAndroidBot) : BotNetworkHandler
bot.logger.error("加载组信息失败|一般这是由于加载过于频繁导致/将以热加载方式加载群列表")
bot.logger.error(e)
}
}
//===log===//
fun fillUntil(long: Number, size: Int): String {
val x = long.toString()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment