mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-06 06:41:08 +00:00
fix: add .catch() to fire-and-forget stale-flag clear to prevent unhandled rejection
This commit is contained in:
committed by
Peter Steinberger
parent
e8f6ceedd4
commit
b36a3a3295
@@ -178,10 +178,12 @@ export function shouldSwitchToLiveModel(params: {
|
||||
// Current model already matches the persisted selection — the switch has
|
||||
// effectively been applied. Clear the stale flag so subsequent fallback
|
||||
// iterations don't re-evaluate it.
|
||||
void clearLiveModelSwitchPending({
|
||||
clearLiveModelSwitchPending({
|
||||
cfg,
|
||||
sessionKey,
|
||||
agentId: params.agentId,
|
||||
}).catch(() => {
|
||||
/* best-effort — fs/lock errors are non-fatal here */
|
||||
});
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user