fix: 优化测速
parent
732458b863
commit
e8d9613139
|
@ -81,11 +81,9 @@ class SpeedTester {
|
|||
}
|
||||
|
||||
async test () {
|
||||
if (this.backupList.length === 0 || this.testCount < 15 || this.testCount % 5 === 0) {
|
||||
const newList = await this.getIpListFromDns(this.dnsMap)
|
||||
const newBackupList = [...newList, ...this.backupList]
|
||||
this.backupList = _.unionBy(newBackupList, 'host')
|
||||
}
|
||||
const newList = await this.getIpListFromDns(this.dnsMap)
|
||||
const newBackupList = [...newList, ...this.backupList]
|
||||
this.backupList = _.unionBy(newBackupList, 'host')
|
||||
this.testCount++
|
||||
|
||||
log.info('[speed]', this.hostname, ' ips:', this.backupList)
|
||||
|
|
Loading…
Reference in New Issue