mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
fix(connections): close conns
This commit is contained in:
parent
b7b9688c9e
commit
f3423abe92
@ -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([
|
||||
@ -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}`)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user