Skip to content

Commit

Permalink
fix(proxy): proxy provider health check not working, closes #282
Browse files Browse the repository at this point in the history
  • Loading branch information
kunish committed Sep 25, 2023
1 parent 713ffb0 commit db24ad2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export const updateProxyProviderAPI = (providerName: string) => {
return request.put(`providers/proxies/${providerName}`)
}

export const proxyProviderHealthCheck = (providerName: string) => {
export const proxyProviderHealthCheckAPI = (providerName: string) => {
const request = useRequest()

return request.get(`providers/proxies/${providerName}/healthcheck`, {
Expand Down
3 changes: 2 additions & 1 deletion src/signals/proxies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
fetchProxyProvidersAPI,
proxyGroupLatencyTestAPI,
proxyLatencyTestAPI,
proxyProviderHealthCheckAPI,
selectProxyInGroupAPI,
updateProxyProviderAPI,
} from '~/apis'
Expand Down Expand Up @@ -185,7 +186,7 @@ export const useProxies = () => {

const proxyProviderLatencyTest = (providerName: string) =>
setProxyProviderLatencyTestingMap(providerName, async () => {
await proxyProviderLatencyTest(providerName)
await proxyProviderHealthCheckAPI(providerName)
await fetchProxies()
})

Expand Down

0 comments on commit db24ad2

Please sign in to comment.