mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-14 23:02:14 +08:00
refactor: streamline app initialization and enhance WebSocket cleanup logic
This commit is contained in:
@@ -63,7 +63,12 @@ export const useMemoryData = () => {
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (timeoutRef.current) {
|
||||
clearTimeout(timeoutRef.current);
|
||||
timeoutRef.current = null;
|
||||
}
|
||||
ws.current?.close();
|
||||
ws.current = null;
|
||||
};
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user