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