Skip to content

Commit 4e252f4

Browse files
committed
Fix: Ensure proxy delay history is recorded on both success and failure
1 parent b239a46 commit 4e252f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

frontend/src/views/HomeView/components/GroupsController.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,17 +107,18 @@ const handleGroupDelay = async (group: string) => {
107107
const delayTest = async (proxy: string) => {
108108
index += 1
109109
update(`Testing... ${index} / ${_group.all.length}, success: ${success} failure: ${failure}`)
110+
const _proxy = kernelApiStore.proxies[proxy]
110111
try {
111112
loadingSet.value.add(proxy)
112113
const { delay } = await getProxyDelay(
113114
encodeURIComponent(proxy),
114115
appSettings.app.kernel.testUrl || DefaultTestURL,
115116
)
116117
success += 1
117-
const _proxy = kernelApiStore.proxies[proxy]
118118
_proxy.history.push({ delay })
119119
} catch {
120120
failure += 1
121+
_proxy.history.push({ delay: 0 })
121122
}
122123
loadingSet.value.delete(proxy)
123124
}

0 commit comments

Comments
 (0)