adp-openclaw 0.0.49 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/monitor.ts +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adp-openclaw",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "ADP-OpenClaw demo channel plugin (Go WebSocket backend)",
5
5
  "type": "module",
6
6
  "dependencies": {
package/src/monitor.ts CHANGED
@@ -177,6 +177,13 @@ async function connectAndHandle(params: ConnectParams): Promise<void> {
177
177
  ws.on("open", () => {
178
178
  log?.info(`[adp-openclaw] WebSocket connected, authenticating...`);
179
179
 
180
+ // 设置 TCP keepalive(作为额外保障)
181
+ const socket = (ws as any)._socket;
182
+ if (socket && typeof socket.setKeepAlive === 'function') {
183
+ socket.setKeepAlive(true, 30000); // 30秒
184
+ log?.info(`[adp-openclaw] TCP keepalive enabled`);
185
+ }
186
+
180
187
  // Save active WebSocket for outbound messaging
181
188
  setActiveWebSocket(ws);
182
189