This commit is contained in:
Yashwini Krishna Murthy 2026-11-25 04:09:26 +00:00 • committed by GitHub
commit 53834c4817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -200,8 +200,28 @@ Comm = {
output.location = location
end
-- Ignore repeated SSDP responses without aborting discovery.
-- Preserve distinct USNs reported by the same host.
if key and results[key] then
return false, "Already recorded a response for this host"
local existing = results[key]
if usn and usn ~= existing.usn then
local devices = existing.ssdp_devices or {}
for _, device in ipairs(devices) do
if device.usn == usn then
return true
end
end
devices[#devices + 1] = {
usn = usn,
location = location
}
existing.ssdp_devices = devices
end
return true
end
local server = string.match(response, "\n[Ss][Ee][Rr][Vv][Ee][Rr]:%s*(.-)\r?\n")