I ran across this issue while using mdns-sd when browsing for a specific service domain. The bug requires the following message pattern to manifest:
Remote end sends an announcement (PTR+SRV+TXT) -- mdns-sd correctly emits ServiceFound and ServiceResolved
Remote end sends an invalidation for only the PTR (setting TTL to zero) -- mdns-sd correctly emits ServiceRemoved
Remote end sends an announcement (PTR+SRV+TXT) before any of the SRV, TXT, A, or AAAA records expire -- mdns-sd emits ServiceFound but does not emit ServiceResolved
From my understanding of the code, it looks like it assumes that a new SRV or TXT (or another non-PTR) record will be received after a new PTR relying on that to trigger the block responsible for resolving the service.
I've added a test (in the place of least resistance) that reproduces this behaviour.
Hi,
I ran across this issue while using mdns-sd when browsing for a specific service domain. The bug requires the following message pattern to manifest:
ServiceFound
andServiceResolved
ServiceRemoved
ServiceFound
but does not emitServiceResolved
From my understanding of the code, it looks like it assumes that a new SRV or TXT (or another non-PTR) record will be received after a new PTR relying on that to trigger the block responsible for resolving the service.
I've added a test (in the place of least resistance) that reproduces this behaviour.