fix(feishu): add WebSocket heartbeat config to prevent silent disconnection#46472
fix(feishu): add WebSocket heartbeat config to prevent silent disconnection#46472120106835 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
…ection Without wsConfig, the Feishu WebSocket connection silently drops after extended idle periods — the connection object remains alive but stops receiving messages. This causes the bot to miss all incoming messages until a gateway restart. Add PingInterval (30s) and PingTimeout (5s) to createFeishuWSClient() to enable keep-alive pings on the WebSocket connection. Ref: larksuiteoapi/node-sdk#42354
Greptile SummaryThis PR fixes a silent WebSocket disconnection issue in the Feishu integration by adding a
Confidence Score: 5/5
Last reviewed commit: f8a9cbc |
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close this PR as superseded by merged maintainer PR #72411. Current main already carries the Feishu-owned heartbeat constructor option, regression coverage, and a broader reconnect/backoff repair, while #72411 explicitly credited this PR’s contribution. The one-file diff here no longer adds useful code to main. Best possible solution: Close this PR as superseded by #72411. Keep the current Feishu-owned heartbeat/reconnect implementation on main, and open a new focused Feishu issue or PR only if live testing shows a remaining disconnect problem under the pinned Lark SDK. What I checked:
So I’m closing this here and keeping the remaining discussion on the canonical linked item. Codex review notes: model gpt-5.5, reasoning high; reviewed against 5de284c2e30f; fix evidence: commit d93e6f61580a. |
Problem
The Feishu WebSocket connection silently drops after extended idle periods. The connection object remains alive but stops receiving messages, causing the bot to miss all incoming messages until a gateway restart.
This is because
createFeishuWSClient()does not passwsConfigtoLark.WSClient, so no WebSocket-level keep-alive pings are sent.Fix
Add
wsConfig: { PingInterval: 30, PingTimeout: 5 }to theLark.WSClientconstructor inextensions/feishu/src/client.ts.Testing
gateway.logthat Feishu messages continue to be received after idle periodsRef: larksuiteoapi/node-sdk#42354