zeroconf: dont cache until resolved

This commit is contained in:
ed 2022-12-08 18:05:45 +00:00
parent 195eb53995
commit aa32f30202
2 changed files with 2 additions and 2 deletions

View file

@ -329,11 +329,11 @@ class MDNS(MCast):
if buf in cache.c:
return
cache.add(buf)
srv: Optional[MDNS_Sck] = self.srv[sck] if v6 else self.map_client(cip) # type: ignore
if not srv:
return
cache.add(buf)
now = time.time()
if self.args.zmv and cip != srv.ip and cip not in srv.ips:

View file

@ -154,11 +154,11 @@ class SSDPd(MCast):
if buf in self.rxc.c:
return
self.rxc.add(buf)
srv: Optional[SSDP_Sck] = self.map_client(cip) # type: ignore
if not srv:
return
self.rxc.add(buf)
if not buf.startswith(b"M-SEARCH * HTTP/1."):
raise Exception("not an ssdp message")