brutella / hc

hc is a lightweight framework to develop HomeKit accessories in Go.
Apache License 2.0
1.74k stars 189 forks source link

Rediscovery services and mdns #140

Closed ErwanMAS closed 5 years ago

ErwanMAS commented 5 years ago

I use this package to manage some hardware , my source is her https://github.com/ErwanMAS/godfrey4home/blob/master/src/homekit-switch.go .

After registration , and a long time . When i restart , the bridge , my iphone can not reconnect to the hk bridge .

I ran some tcpdump on 5353 , and i saw that the phone always made a query on _hap._tcp.local. PTR .

The mdns hc bridge provide by /brutella/hc/ , does not reply , with a answer .

If i comment this line , i have what i think the good behavior, the bridge reply with a response to himself .

https://github.com/brutella/dnssd/blob/61d1bc6e53ace5b3d9ecb46ffd0b3158c00ae9d0/responder.go#L437

I think the object req.msg.Answer , must not store answers from his own local services .

ErwanMAS commented 5 years ago

i re-created issue on the repository /brutella/dnssd/ see issue on brutella/dnssd#11