mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 21:58:24 +00:00
refactor(macos): dedupe UI, pairing, and runtime helpers
This commit is contained in:
@@ -336,16 +336,8 @@ final class ControlChannel {
|
||||
}
|
||||
|
||||
private func startEventStream() {
|
||||
self.eventTask?.cancel()
|
||||
self.eventTask = Task { [weak self] in
|
||||
guard let self else { return }
|
||||
let stream = await GatewayConnection.shared.subscribe()
|
||||
for await push in stream {
|
||||
if Task.isCancelled { return }
|
||||
await MainActor.run { [weak self] in
|
||||
self?.handle(push: push)
|
||||
}
|
||||
}
|
||||
GatewayPushSubscription.restartTask(task: &self.eventTask) { [weak self] push in
|
||||
self?.handle(push: push)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user