fix: throttle WebSocket subscriptions to prevent UI freeze on profile switch (#6683) (#6686)

Add leading-edge throttle to useMihomoWsSubscription, reduce SWR retry
aggressiveness, and increase WebSocket reconnect delay to prevent event
storms when switching profiles under poor network conditions.
This commit is contained in:
Tunglies
2026-04-02 13:22:30 +00:00
committed by GitHub
parent 3714f0c4c8
commit 824bcc77eb
5 changed files with 61 additions and 12 deletions
+2 -2
View File
@@ -23,8 +23,8 @@ export const SWR_SLOW_POLL = {
export const SWR_MIHOMO = {
...SWR_NOT_SMART,
errorRetryInterval: 500,
errorRetryCount: 15,
errorRetryInterval: 2000,
errorRetryCount: 3,
}
export const SWR_EXTERNAL_API = {