Skip to content

Commit f8a9cbc

Browse files
黎炎佳黎炎佳
authored andcommitted
fix(feishu): add WebSocket heartbeat config to prevent silent disconnection
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
1 parent c30cabc commit f8a9cbc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

extensions/feishu/src/client.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ export function createFeishuWSClient(account: ResolvedFeishuAccount): Lark.WSCli
164164
domain: resolveDomain(domain),
165165
loggerLevel: Lark.LoggerLevel.info,
166166
...(agent ? { agent } : {}),
167+
wsConfig: {
168+
PingInterval: 30,
169+
PingTimeout: 5,
170+
},
167171
});
168172
}
169173

0 commit comments

Comments
 (0)