From b3e77119fbcf44168b7d51cf6a2a8cf882b7776c Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 29 Jan 2021 09:05:47 +0800 Subject: [PATCH] Shuffle server list when RequireReconnect --- .../src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mirai-core/src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt b/mirai-core/src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt index 24cf2a890..fd808bc1e 100644 --- a/mirai-core/src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt +++ b/mirai-core/src/commonMain/kotlin/network/QQAndroidBotNetworkHandler.kt @@ -481,7 +481,7 @@ internal class QQAndroidBotNetworkHandler(coroutineContext: CoroutineContext, bo if (resp.serverList.isNotEmpty()) { bot.serverList.clear() - resp.serverList.forEach { + resp.serverList.shuffled().forEach { bot.serverList.add(it.host to it.port) } }