mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-27 22:54:03 +08:00
fix: set latency for test failed (#948)
This commit is contained in:
parent
9a9c5ae35d
commit
9189bf5efb
@ -184,6 +184,7 @@ export const useProxies = () => {
|
|||||||
|
|
||||||
setProxyLatencyTestingMap(nodeName, async () => {
|
setProxyLatencyTestingMap(nodeName, async () => {
|
||||||
await proxyIPv6SupportTest(nodeName, provider)
|
await proxyIPv6SupportTest(nodeName, provider)
|
||||||
|
try {
|
||||||
const { delay } = await proxyLatencyTestAPI(
|
const { delay } = await proxyLatencyTestAPI(
|
||||||
nodeName,
|
nodeName,
|
||||||
provider,
|
provider,
|
||||||
@ -195,6 +196,12 @@ export const useProxies = () => {
|
|||||||
...latencyMap,
|
...latencyMap,
|
||||||
[nodeName]: delay,
|
[nodeName]: delay,
|
||||||
}))
|
}))
|
||||||
|
} catch {
|
||||||
|
setLatencyMap((latencyMap) => ({
|
||||||
|
...latencyMap,
|
||||||
|
[nodeName]: latencyQualityMap().NOT_CONNECTED,
|
||||||
|
}))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user