fix: clear closed connections
This commit is contained in:
@@ -141,9 +141,11 @@ export const useConnectionData = () => {
|
|||||||
|
|
||||||
const clearClosedConnections = () => {
|
const clearClosedConnections = () => {
|
||||||
mutate(`$sub$${subscriptKey}`, {
|
mutate(`$sub$${subscriptKey}`, {
|
||||||
activeConnections: response.data?.activeConnections,
|
uploadTotal: response.data?.uploadTotal ?? 0,
|
||||||
|
downloadTotal: response.data?.downloadTotal ?? 0,
|
||||||
|
activeConnections: response.data?.activeConnections ?? [],
|
||||||
closedConnections: [],
|
closedConnections: [],
|
||||||
});
|
} as ConnectionMonitorData);
|
||||||
};
|
};
|
||||||
|
|
||||||
return { response, refreshGetClashConnection, clearClosedConnections };
|
return { response, refreshGetClashConnection, clearClosedConnections };
|
||||||
|
|||||||
Reference in New Issue
Block a user