Using ping for the keep alive, doing it on a 10min cycle

This commit is contained in:
Jerome 2025-06-18 13:53:42 +01:00
commit 7872b5fdb7
No known key found for this signature in database

View file

@ -654,7 +654,7 @@ export class MCPConnectionManager {
// Start health check every 30 seconds // Start health check every 30 seconds
this.healthCheckInterval = setInterval(async () => { this.healthCheckInterval = setInterval(async () => {
await this.performHealthCheck(); await this.performHealthCheck();
}, 30000); }, 10 * 60 * 1000); // 10 minutes
} }
@ -666,7 +666,7 @@ export class MCPConnectionManager {
try { try {
// Try to list tools as a health check - this is a lightweight operation // Try to list tools as a health check - this is a lightweight operation
await this.client.listTools(); await this.client.ping();
} catch (error) { } catch (error) {
console.warn(`Health check failed for ${this.connection.name}:`, error); console.warn(`Health check failed for ${this.connection.name}:`, error);
await this.handleHealthCheckFailure(error); await this.handleHealthCheckFailure(error);