From 7872b5fdb71eef3c176602c09039dd1a4cf8ffae Mon Sep 17 00:00:00 2001 From: Jerome Date: Wed, 18 Jun 2025 13:53:42 +0100 Subject: [PATCH] Using ping for the keep alive, doing it on a 10min cycle --- src/mcp/connection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mcp/connection.ts b/src/mcp/connection.ts index 1c25379..7acc523 100644 --- a/src/mcp/connection.ts +++ b/src/mcp/connection.ts @@ -654,7 +654,7 @@ export class MCPConnectionManager { // Start health check every 30 seconds this.healthCheckInterval = setInterval(async () => { await this.performHealthCheck(); - }, 30000); + }, 10 * 60 * 1000); // 10 minutes } @@ -666,7 +666,7 @@ export class MCPConnectionManager { try { // Try to list tools as a health check - this is a lightweight operation - await this.client.listTools(); + await this.client.ping(); } catch (error) { console.warn(`Health check failed for ${this.connection.name}:`, error); await this.handleHealthCheckFailure(error);