From d647405a20932a2ee131b4287c8b99de38b95a8d Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Fri, 9 May 2025 22:34:25 +0200 Subject: WIP: Make the relay acknowledge received commands xP now slightly throttles activity notifications, and indicates when there are unacknowledged commands. Relay events have been reordered to improve forward compatibility. As can be observed, even the smallest protocol change has great consequences. WIP: - xC: fix connection killing --- xM/main.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'xM') diff --git a/xM/main.swift b/xM/main.swift index 48f26c4..39b66c5 100644 --- a/xM/main.swift +++ b/xM/main.swift @@ -173,8 +173,11 @@ class RelayRPC { func send(data: RelayCommandData, callback: Callback? = nil) { self.commandSeq += 1 let m = RelayCommandMessage(commandSeq: self.commandSeq, data: data) - if let callback = callback { - self.commandCallbacks[m.commandSeq] = callback + self.commandCallbacks[m.commandSeq] = callback ?? { error, data in + if data == nil { + NSSound.beep() + Logger().warning("\(error)") + } } var w = RelayWriter() -- cgit v1.2.3-70-g09d2