keepsimple1 / mdns-sd

Rust library for mDNS based Service Discovery
Apache License 2.0
89 stars 38 forks source link

refresh SRV records and send out ServiceRemoved for expired SRV #180

Closed keepsimple1 closed 2 months ago

keepsimple1 commented 4 months ago

This patch is to fix issue raised in #176. There are two parts:

Added a new setter _set_host_ttl() for DnsRecord to support testing.

Also addressed issue #203 : only apply cache-flush bit if the record is new, i.e. rdata changed. Otherwise, it is only a refresh of TTL. This makes sense to me as it can avoid unnecessary new ServiceResolved events.

Also removed -Wclippy::all from CI as it refers the default warnings, hence is redundant with -D warnings. (https://doc.rust-lang.org/clippy/)

keepsimple1 commented 2 months ago

Rebased to the latest main branch and update the PR description.