Make the SSDP service discovery more robust
This commit is contained in:
@@ -46,7 +46,12 @@ func LoadSSDPservices(delay int) (map[string]string, error) {
|
|||||||
address = &addr
|
address = &addr
|
||||||
}
|
}
|
||||||
|
|
||||||
list, err := ssdp.Search(ssdp.All, delay, address.String())
|
var addrString string
|
||||||
|
if address != nil {
|
||||||
|
addrString = address.String()
|
||||||
|
}
|
||||||
|
|
||||||
|
list, err := ssdp.Search(ssdp.All, delay, addrString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("LoadSSDPservices search error: %w", err)
|
return nil, fmt.Errorf("LoadSSDPservices search error: %w", err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user