RxDNSSD
RxDNSSD copied to clipboard
DNSSD.queryRecord doesn't call `operationFailed()` on timeout
Currently the DNSSD.queryRecord()
implementation called with withTimeout
= true
doesn't call the operationFailed()
callback of provided QueryListener
if a timeout occurs. Instead it just silently stops the scan and that's it.
Also there is no way to set DNSSD.serviceTimeout
when using e.g. DNSSDBindable
- it has only one constructor. So the timeout is always set to default.
Hi,
Yes, timeout is working in that way. DNSSD just stops search without any listener call. I guess it's too big a change that will break a lot of applications.
I would recommend building a timeout on your side. If you use the Rx library should be one line of code.
Thanks for a super fast answer! Yes, that makes sense. We should not break existing apps.
What about allowing setting a custom timeout from DNSSDBindable
? The DNSSD constructor which allows setting it is not accessible from any public API.