优化代理和重试逻辑

This commit is contained in:
yml2213
2026-06-22 15:54:45 +08:00
parent 9fba12aad0
commit f94b323ad8
3 changed files with 29 additions and 18 deletions
+2 -7
View File
@@ -56,6 +56,8 @@ export default function ProxyPage() {
};
ws.onclose = () => {
wsRef.current = null;
setTesting(false);
setTestingWl(false);
};
};
@@ -96,13 +98,6 @@ export default function ProxyPage() {
}
};
// WebSocket 关闭后恢复按钮
useEffect(() => {
if (!wsRef.current) {
setTesting(false);
setTestingWl(false);
}
}, [logs.length === 0]);
const logColors: Record<string, string> = {
error: '#ff4d4f',