Using ping for the keep alive, doing it on a 10min cycle
This commit is contained in:
parent
4771d8f1c8
commit
7872b5fdb7
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue