Closed mcsakoff closed 11 months ago
Traced down to this line:
https://github.com/brutella/hap/blob/98079d5315240e20da559d80c3bc8c69473fc46e/server.go#L246
It never returns from the function call even when context is canceled. Looks like the issue must be addressed to brutella/dnssd.
Workaround
Provide one specific interface:
server.Ifaces = []string{"en0"}
This may be fixed by https://github.com/brutella/dnssd/pull/43
Please check out hap v0.0.28 which includes this change.
hap v0.0.28 dnssd v1.2.10
Fixed. Discovery works fine. I suppose that #33 and #34 can be closed as well.
OS: MacOS Sonoma, MacOS Ventrura hap v0.0.27
Calling
cancel()
doesn't make it gracefully exit fromserver.ListenAndServe(ctx)
.I added some logging
Result:
Application exits with return value 130 after second Crtl+C.
PS: Linux is not affected