From bb1845bea494dc4060c934572f15c66d24fe9de2 Mon Sep 17 00:00:00 2001 From: Alex Ballas Date: Sun, 23 Feb 2025 17:17:40 +0200 Subject: [PATCH] Make the SSDP service discovery more robust --- devices/devices.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/devices/devices.go b/devices/devices.go index 9748aac..08c60d6 100644 --- a/devices/devices.go +++ b/devices/devices.go @@ -46,7 +46,12 @@ func LoadSSDPservices(delay int) (map[string]string, error) { 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 { return nil, fmt.Errorf("LoadSSDPservices search error: %w", err) }