fix(gui-client): remove bad hook dependencies (#9537)

The removed hook dependencies are invalid because the side-effect
specified in `useEffect` does in fact not depend on them. However, as a
result of these dependencies, the `useEffect` closure appears to run in
an end-less loop, constantly sending the `update_state` command to the
backend which in turn re-sends all state to the frontend, causing a
massive CPU and memory spike.

Resolves: #9519
This commit is contained in:
Thomas Eizinger
2025-06-15 19:09:07 +02:00
committed by GitHub
parent 25434c6898
commit 3660f53150
2 changed files with 6 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ export default function App() {
advancedSettingsChangedUnlisten.then((unlistenFn) => unlistenFn());
logsRecountedUnlisten.then((unlistenFn) => unlistenFn());
};
}, [location, handleClick]);
}, []);
const isDev = import.meta.env.DEV;

View File

@@ -10,7 +10,11 @@ export default function GUI({ os }: { os: OS }) {
return (
<Entries downloadLinks={downloadLinks(os)} title={title(os)}>
{/* When you cut a release, remove any solved issues from the "known issues" lists over in `client-apps`. This must not be done when the issue's PR merges. */}
<Unreleased></Unreleased>
<Unreleased>
<ChangeItem pull="9537">
Fixes an issue that caused increased CPU and memory consumption.
</ChangeItem>
</Unreleased>
<Entry version="1.5.2" date={new Date("2025-06-12")}>
<ChangeItem pull="8160">
Moves network change listening to the tunnel service for improved