Administrator
2 days ago 65d1adc773c6b3bc65cf3bee4d0b3832445a510e
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
commit65d1adc773c6b3bc65cf3bee4d0b3832445a510e
tree 451c671f28c1595668188ef81e06b8fd373c3981 tree | zip | gz
parent a3eba2dd5acc7f7a5fba9681e079c9f814ec550d 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