fix: serialize OS state reads with in-progress update_sysproxy

This commit is contained in:
wonfen
2026-04-22 12:20:26 +08:00
parent 1eb194d0f9
commit 4d408a8c1a
4 changed files with 15 additions and 2 deletions
+1 -1
View File
@@ -57,10 +57,10 @@ export const useSystemProxyState = () => {
while (pendingRef.current !== null) {
const target = pendingRef.current
pendingRef.current = null
await patchVerge({ enable_system_proxy: target })
if (!target && verge?.auto_close_connection) {
await closeAllConnections().catch(() => {})
}
await patchVerge({ enable_system_proxy: target })
}
} finally {
busyRef.current = false