Fix: Clean up health check interval in onShellExecutionComplete to prevent memory leak

This commit is contained in:
Roo Code 2025-11-16 11:01:39 +00:00
parent d4cd4772f3
commit 2868365fae

View file

@ -114,6 +114,13 @@ export class ServiceManager {
// If stopping, status changes from stopping to stopped/failed
// If unexpected exit, status changes from starting/ready/running to stopped/failed
serviceHandle.status = details.exitCode === 0 ? "stopped" : "failed"
// Clean up health check interval to prevent memory leak
if (serviceHandle.healthCheckIntervalId) {
clearInterval(serviceHandle.healthCheckIntervalId)
serviceHandle.healthCheckIntervalId = undefined
}
this.notifyStatusChange(serviceHandle)
},
}