From 7b64abdb11abfaff26117c6296c6e9ae465ab609 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Tue, 14 Sep 2021 23:30:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BF=AE=E5=A4=8D=E6=B5=8B?= =?UTF-8?q?=E9=80=9F=E6=B2=A1=E6=9C=89=E8=8E=B7=E5=8F=96=E5=88=B0ip?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E9=87=8D=E8=AF=95=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mitmproxy/src/lib/speed/SpeedTester.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mitmproxy/src/lib/speed/SpeedTester.js b/packages/mitmproxy/src/lib/speed/SpeedTester.js index 900ee29..f05ad49 100644 --- a/packages/mitmproxy/src/lib/speed/SpeedTester.js +++ b/packages/mitmproxy/src/lib/speed/SpeedTester.js @@ -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')