refactor: 修复测速没有获取到ip时不重试的bug

pull/192/head
xiaojunnuo 2021-09-14 23:30:17 +08:00
parent 859e7f38e6
commit 7b64abdb11
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ class SpeedTester {
}
async test () {
if (this.testCount % 10 === 0) {
if (this.testCount % 10 === 0 || this.backupList.length === 0) {
const newList = await this.getIpListFromDns(this.dnsMap)
const newBackupList = [...newList, ...this.backupList]
this.backupList = _.unionBy(newBackupList, 'host')