@autolabz/mcp-bridge 1.0.2 → 1.0.3
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/dist/bridge.js +2 -2
- package/package.json +1 -1
package/dist/bridge.js
CHANGED
|
@@ -57,9 +57,8 @@ export class Bridge {
|
|
|
57
57
|
console.error(`❌ Cloud error: ${msg.message}`);
|
|
58
58
|
}
|
|
59
59
|
else if (msg.type === 'pong') {
|
|
60
|
+
console.log('💓 Pong');
|
|
60
61
|
// Heartbeat response received
|
|
61
|
-
// You could update a "lastActivity" timestamp here if you wanted
|
|
62
|
-
// to implement a watchdog that reconnects if the server is silent for too long.
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
64
|
catch (err) {
|
|
@@ -135,6 +134,7 @@ export class Bridge {
|
|
|
135
134
|
// this.sendPing(); // Optional: send one immediately
|
|
136
135
|
this.heartbeatTimer = setInterval(() => {
|
|
137
136
|
if (this.ws?.readyState === WebSocket.OPEN) {
|
|
137
|
+
console.log('💓 Ping');
|
|
138
138
|
this.ws.send(JSON.stringify({ type: 'ping' }));
|
|
139
139
|
}
|
|
140
140
|
}, HEARTBEAT_INTERVAL);
|