Closed tlk closed 2 years ago
I had a look at updating the code to use the Network framework (like this changeset https://github.com/dhleong/castable/commit/de8ae8e6ef6ad7af2e0cd8c53a09ef27b06ebb7d) only to find that it does not provide a way to get the service port.
Consider dropping the resolve code and simply hardcode the port number to 8080
.
So I inspected network traffic, instrumented the code, inspected the code for threading and ARC issues, rewrote relevant parts of the code, etc but failed to figure out what caused this issue.
As far as I can see, network traffic looks identical during success and failure scenarios.
The issue seems to be happening less frequently the more you look for it.
Leave it for a couple of hours and the issue is very likely to appear.
As a work around, I have Implemented a watchdog to compensate for any sporadic resolver issues.
There is an issue where the BeoplayRemoteGUI.app sometimes, but not always, fails to auto-connect to the device it was last connected to.
This issue was observed quite frequently on recent macOS releases while macOS 11.5.2 appears to have reduced the failure rate.
I have observed similar behaviour using the DNS-SD Browser discovery.app where a device is discovered but sometimes resolving is either very slow or fails to complete.