优化代理和重试逻辑
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user