Administrator
2 days ago 902fdff3c27330a2b94ac7418b351841be208e6b
refs
author Administrator <15274802129@163.com>
Monday, October 12, 2026 21:53 +0800
committer Administrator <15274802129@163.com>
Tuesday, October 13, 2026 09:45 +0800
commit902fdff3c27330a2b94ac7418b351841be208e6b
tree b859ce0ec268173989fdc0f4c2d6ab35f8f20e74 tree | zip | gz
parent 170eaeaa62decae6f6b276ee9962b05af7849b3f view | diff
refactor(gateApi): 重构WebSocket客户端心跳与重连机制

- 将重连策略从有限次数改为无限次指数退避(5s-60s上限)
- 添加destroyed标记防止销毁后继续重连
- 实现应用层心跳检测机制(10秒ping,45秒判定死亡)
- 集成TCP层保活机制(30秒connectionLostTimeout)
- 添加reconnectInProgress防止并发重连
- 优化错误处理:统一通过onClose触发重连流程
- 增加重连计数跟踪和日志记录
- 修复异常路径下isConnecting状态未重置的问题
1 files modified
177 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/gateApi/GateKlineWebSocketClient.java 177 ●●●●● diff | view | raw | blame | history