mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
fix: close connections when profile change
This commit is contained in:
parent
e00f826eb8
commit
e031389021
|
@ -12,7 +12,7 @@ import {
|
|||
importProfile,
|
||||
enhanceProfiles,
|
||||
} from "@/services/cmds";
|
||||
import { getProxies, updateProxy } from "@/services/api";
|
||||
import { closeAllConnections, getProxies, updateProxy } from "@/services/api";
|
||||
import { atomCurrentProfile } from "@/services/states";
|
||||
import { BasePage, Notice } from "@/components/base";
|
||||
import { ProfileNew } from "@/components/profile/profile-new";
|
||||
|
@ -134,6 +134,7 @@ const ProfilePage = () => {
|
|||
setCurrentProfile(current);
|
||||
mutate("getProfiles", { ...profiles, current: current }, true);
|
||||
mutate("getRuntimeLogs");
|
||||
closeAllConnections();
|
||||
Notice.success("Refresh clash config", 1000);
|
||||
} catch (err: any) {
|
||||
Notice.error(err?.message || err.toString(), 4000);
|
||||
|
|
Loading…
Reference in New Issue
Block a user