fix: shorten session heartbeat interval to 15s

This commit is contained in:
richjohnrambo
2026-09-17 00:16:14 +08:00
parent 0f8e3b82b7
commit 7df3313c78
4 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ ServerComMessage
2. `sess.bkgTimer` — 后台超时定时器
3. `sess.stop` — 停止信号
4. `sess.detach` — 取消订阅
5. `ticker` — Ping 帧(每 30s 发送一次)
5. `ticker` — Ping 帧(每 15s 发送一次)
### Keep-Alive
@@ -49,7 +49,7 @@ ServerComMessage
|------|-----|------|
| `writeWait` | 10s | 写超时 |
| `pongWait` | `idleSessionTimeout` | 期望收到 Pong 的时间(当前默认 45s) |
| `pingPeriod` | 30s | WebSocket Ping 间隔 |
| `pingPeriod` | 15s | WebSocket Ping 间隔 |
| 心跳探测 | WebSocket Ping/Pong | 当前 IM 长连接保活以协议层 Ping/Pong 为准;业务 `note kp/kpa/kpv` 不能替代 Pong |
### 缓冲区设置