Skip to content

Commit 7ef638f

Browse files
fix: revert userSavedProxy from auto-selection useEffect dependencies
The auto-selection useEffect should not include userSavedProxy in its dependencies as it should only run when latencies are loaded, not when the user proxy changes. The check inside the useEffect is sufficient. Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
1 parent 34b40da commit 7ef638f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/src/contexts/ProxyContext.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export const ProxyProvider: FC<PropsWithChildren> = ({ children }) => {
211211
saveUserSelectedProxy(best.proxy);
212212
updateProxy();
213213
}
214-
}, [latenciesLoaded, proxiesResp, proxyLatencies, userSavedProxy]);
214+
}, [latenciesLoaded, proxiesResp, proxyLatencies]);
215215

216216
return (
217217
<ProxyContext.Provider

0 commit comments

Comments
 (0)