Registered service is not properly unregistered with RMV?
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.
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.
Ah right, but shouldn't the unregister be a method which actually removes the service from the cache the moment you call it?
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.