network-audio-controller
network-audio-controller copied to clipboard
fix: StopIteration error when channel number is not cast to an int
Since channel number was not cast to an int, the channel was never matched and never found resulting in the following error even when using correct channel numbers for subscription add and remove commands.
RuntimeError
coroutine raised StopIteration
at /usr/lib/python3.12/asyncio/base_events.py:687 in run_until_complete
683│ future.remove_done_callback(_run_until_complete_cb)
684│ if not future.done():
685│ raise RuntimeError('Event loop stopped before Future completed.')
686│
→ 687│ return future.result()
688│
689│ def stop(self):
690│
691│
Fixes #10
Great PR, this needs to be added, while you're at it, the IP address also has a similar issue and should be assigned like this (changing tx/rx as needed):
lambda d: d[1].ipv4 == ipaddress.ip_address(self.option("rx-device-host"))
Edit: opened a PR myself - #38