Improve HomeKit source start time

This commit is contained in:
Alexey Khit
2023-07-20 21:46:06 +03:00
parent 2bc01c143a
commit 6c0918662e
2 changed files with 18 additions and 8 deletions
+2
View File
@@ -106,6 +106,8 @@ func Query(host, service string) (entry *ServiceEntry, err error) {
return
}
// QueryOrDiscovery - useful if we know previous device host and want
// to update port or any other information. Will work even over VPN.
func QueryOrDiscovery(host, service string, onentry func(*ServiceEntry) bool) error {
entry, _ := Query(host, service)
if entry != nil && onentry(entry) {