1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-07 12:43:32 +08:00
This commit is contained in:
Mrs4s 2020-11-17 19:28:19 +08:00
parent d10231af11
commit 0bb7d3e9a6

View File

@ -208,15 +208,15 @@ func NewClientMd5(uin int64, passwordMd5 [16]byte) *QQClient {
wg := sync.WaitGroup{}
wg.Add(len(cli.servers))
for i := range cli.servers {
go func(index int, w sync.WaitGroup) {
defer w.Done()
go func(index int) {
defer wg.Done()
p, err := qualityTest(cli.servers[index])
if err != nil {
pings[index] = 9999
return
}
pings[index] = p
}(i, wg)
}(i)
}
wg.Wait()
sort.Slice(cli.servers, func(i, j int) bool {