Skip to content

feat: diagnostic hint after Discord gateway reconnect exhaustion #1

@cncoder

Description

@cncoder

背景

Discord gateway 连不上时(比如没配代理、网络墙),ws 会静默重试到 "Max reconnect attempts",日志里没有"可能是代理问题"的提示。用户只看到 ETIMEDOUT / reset,不知道下一步怎么办。

相关代码:`src/discord/monitor/provider.lifecycle.ts:263` `shouldStopOnGatewayError`

提案

连续 N 次 reconnect 失败(建议 N=3)后:

  • 检测 error code 是否为 ETIMEDOUT / ECONNREFUSED / ENETUNREACH
  • 如果是,且 channels.discord.proxy 为空,log 一条 WARN:
    ```
    discord: gateway unreachable after 3 retries. If you're behind a firewall, set channels.discord.proxy in openclaw.json (e.g. http://127.0.0.1:7897).
    ```
  • 对 telegram / feishu 同样处理

影响

降低入门用户困惑,减少社区 "Discord 连不上" 类 issue。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions