Skip to content

Commit

Permalink
fix(connections): close conns
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephyruso authored and Zephyruso committed Sep 8, 2023
1 parent b7b9688 commit f3423ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/signals/proxies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const setProxiesInfo = (proxies: (Proxy | ProxyNode)[]) => {

export const useProxies = () => {
const request = useRequest()
const { activeConnectionsWithSpeed } = useConnections()
const { activeConnections } = useConnections()

const updateProxies = async () => {
const [{ providers }, { proxies }] = await Promise.all([
Expand Down Expand Up @@ -83,7 +83,7 @@ export const useProxies = () => {
const proxyGroup = proxyGroupList.find((i) => i.name === proxy.name)!

if (autoCloseConns()) {
activeConnectionsWithSpeed().forEach(({ id, chains }) => {
activeConnections().forEach(({ id, chains }) => {
if (chains.includes(proxy.name)) {
request.delete(`connections/${id}`)
}
Expand Down

0 comments on commit f3423ab

Please sign in to comment.