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.
- package/package.json +1 -1
- package/src/monitor.ts +7 -0
package/package.json
CHANGED
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
|
|