mirror of https://github.com/openclaw/openclaw.git
The heartbeat scheduler silently dies after the first batch because run() has multiple exit paths that skip scheduleNext(). Once any path returns without re-arming the timer, heartbeats stop permanently. The most common trigger is the requests-in-flight early return, but any unhandled rejection in the async chain between runOnce() and the manual scheduleNext() calls can also kill the timer. Fix: wrap the run() body in try/finally so scheduleNext() is called on every exit path. All manual scheduleNext() calls inside are removed — the finally block is the single re-arm point. The requests-in-flight case is excluded via a flag because the wake layer (heartbeat-wake.ts) already handles retry scheduling for this case with DEFAULT_RETRY_MS. Calling scheduleNext() here would register a 0ms timer that races with the wake layer's 1s retry. Fixes #31139 Fixes #45772 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| acp | ||
| agents | ||
| auto-reply | ||
| bindings | ||
| bootstrap | ||
| canvas-host | ||
| channels | ||
| chat | ||
| cli | ||
| commands | ||
| compat | ||
| config | ||
| context-engine | ||
| cron | ||
| daemon | ||
| docs | ||
| extensions | ||
| flows | ||
| gateway | ||
| generated | ||
| hooks | ||
| i18n | ||
| image-generation | ||
| infra | ||
| interactive | ||
| link-understanding | ||
| logging | ||
| markdown | ||
| media | ||
| media-understanding | ||
| node-host | ||
| pairing | ||
| plugin-sdk | ||
| plugins | ||
| process | ||
| routing | ||
| scripts | ||
| secrets | ||
| security | ||
| sessions | ||
| shared | ||
| terminal | ||
| test-helpers | ||
| test-utils | ||
| tts | ||
| tui | ||
| types | ||
| utils | ||
| web-search | ||
| wizard | ||
| bundled-web-search-registry.ts | ||
| channel-web.ts | ||
| docker-build-cache.test.ts | ||
| docker-image-digests.test.ts | ||
| docker-setup.e2e.test.ts | ||
| dockerfile.test.ts | ||
| entry.respawn.test.ts | ||
| entry.respawn.ts | ||
| entry.test.ts | ||
| entry.ts | ||
| entry.version-fast-path.test.ts | ||
| extensionAPI.ts | ||
| global-state.ts | ||
| globals.ts | ||
| index.test.ts | ||
| index.ts | ||
| install-sh-version.test.ts | ||
| library.test.ts | ||
| library.ts | ||
| logger.test.ts | ||
| logger.ts | ||
| logging.ts | ||
| param-key.ts | ||
| poll-params.test.ts | ||
| poll-params.ts | ||
| polls.test.ts | ||
| polls.ts | ||
| runtime.ts | ||
| utils.test.ts | ||
| utils.ts | ||
| version.test.ts | ||
| version.ts | ||