Skip to content

Commit 8f22534

Browse files
authored
fix(macos): cancelled Talk sessions can spin at full CPU (#129682)
* fix(macos): stop cancelled Talk silence monitors * fix(macos): reuse cancellable periodic task owner
1 parent 1c37c8c commit 8f22534

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎apps/macos/Sources/OpenClaw/TalkModeRuntime.swift‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,7 @@ actor TalkModeRuntime {
479479
}
480480

481481
private func silenceLoop() async {
482-
while self.isEnabled {
483-
try? await Task.sleep(nanoseconds: 200_000_000)
482+
while self.isEnabled, await SimpleTaskSupport.waitForNextOperation(interval: 0.2) {
484483
await self.checkSilence()
485484
}
486485
}

0 commit comments

Comments
 (0)