rust-mdns icon indicating copy to clipboard operation
rust-mdns copied to clipboard

Registered service is not properly unregistered with RMV?

Open soundprojects opened this issue 7 years ago • 3 comments

When closing a application, the drop method should unregister a registered service but when checking with dns-sd in the terminal, the service is still active.

soundprojects avatar Sep 15 '18 18:09 soundprojects

dns-sd probably is the well-implemented mDNS querier - it keeps track of all services in the local network. So for a while, it will have cached information about your published server. This crate publisher has TTL 60 seconds if I remember correctly.

So try to ask dns-sd about the service after 1 minute - it should have it removed from the cache.

quilir avatar Sep 15 '18 19:09 quilir

Ah right, but shouldn't the unregister be a method which actually removes the service from the cache the moment you call it?

soundprojects avatar Sep 15 '18 19:09 soundprojects

It removes it from memory of the responder. It will not be published anymore.

Continuous queriers, the ones that keep the real-time list of services, have to cache it to not flood the network with queries (e.g. when you would call dns-sd million times a second). dns-sd has the daemon that does it. Command from the terminal only asks that daemon without generating any network traffic.

quilir avatar Sep 16 '18 04:09 quilir