Commit 07f65704 authored by Him188's avatar Him188

Remove unnecessary list creation

parent d10b1a9e
...@@ -8,7 +8,6 @@ import net.mamoe.mirai.utils.solveIpAddress ...@@ -8,7 +8,6 @@ import net.mamoe.mirai.utils.solveIpAddress
object TIMProtocol { object TIMProtocol {
val SERVER_IP: List<String> = { val SERVER_IP: List<String> = {
//add("183.60.56.29") //add("183.60.56.29")
val list = mutableListOf<String>()
arrayOf( arrayOf(
"sz3.tencent.com", "sz3.tencent.com",
"sz4.tencent.com", "sz4.tencent.com",
...@@ -17,9 +16,7 @@ object TIMProtocol { ...@@ -17,9 +16,7 @@ object TIMProtocol {
"sz8.tencent.com", "sz8.tencent.com",
"sz9.tencent.com", "sz9.tencent.com",
"sz2.tencent.com" "sz2.tencent.com"
).forEach { list.add(solveIpAddress(it)) } // 需 IPv4 地址 ).map { solveIpAddress(it) } // 需 IPv4 地址
list.toList()
}()//不使用lazy, 在初始化时就加载. }()//不使用lazy, 在初始化时就加载.
val head = "02".hexToBytes() val head = "02".hexToBytes()
......
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