When a zeroconf service server is being stopped using Shutdown() a DNS response is being send out with a TTL of zero to inform clients that the service is not active anymore. However a client that is using Browse() is unable to receive this information as this is being filtered out in the mainloop() of the client: https://github.com/grandcat/zeroconf/blob/master/client.go#L276
There are at least two solutions:
- Remove the whole filter logic and pass all entries on via
params.Entries. This also allows a client to be informed about the latest TTL of the service. Currently a client only gets the first entry but will not receive updates later on.
- Pass the entry with TTL = 0 on in case
sentEntries contains the service as this indicates that the service information were once passed on.
When a zeroconf service server is being stopped using
Shutdown()a DNS response is being send out with a TTL of zero to inform clients that the service is not active anymore. However a client that is usingBrowse()is unable to receive this information as this is being filtered out in themainloop()of the client: https://github.com/grandcat/zeroconf/blob/master/client.go#L276There are at least two solutions:
params.Entries. This also allows a client to be informed about the latest TTL of the service. Currently a client only gets the first entry but will not receive updates later on.sentEntriescontains the service as this indicates that the service information were once passed on.