Skip to content

Enhancement: WS /ws/chat 缺少心跳/ping-pong 保活机制 #41

Closed

Description

@dahai80

问题描述

WebSocket /ws/chat 连接没有 ping/pong 保活机制,长时间空闲后可能被代理或防火墙断开。

当前行为

  • 连接建立后无定期心跳
  • 长时间无消息时连接可能静默断开
  • 客户端无法区分"空闲"和"已断开"

修复建议

  1. 服务端每 30s 发送 ping frame
  2. 客户端回复 pong frame
  3. 超时未收到 pong 则标记连接断开
  4. 客户端检测超时后自动重连

关联

  • 端到端验证报告: ~/fusion/architecture/validate-fusion-code.md ISSUE-8
  • code-2-studio.md Layer 3 WS spec

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions