Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion zeroconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ def get_name(self):
def update_record(self, zc: 'Zeroconf', now: float, record: DNSRecord) -> None:
"""Updates service information from a DNS record"""
if record is not None and not record.is_expired(now):
if record.type == _TYPE_A:
if record.type in [_TYPE_A, _TYPE_AAAA]:
assert isinstance(record, DNSAddress)
# if record.name == self.name:
if record.name == self.server:
Expand All @@ -1622,6 +1622,7 @@ def update_record(self, zc: 'Zeroconf', now: float, record: DNSRecord) -> None:
self.priority = record.priority
# self.address = None
self.update_record(zc, now, zc.cache.get_by_details(self.server, _TYPE_A, _CLASS_IN))
self.update_record(zc, now, zc.cache.get_by_details(self.server, _TYPE_AAAA, _CLASS_IN))
elif record.type == _TYPE_TXT:
assert isinstance(record, DNSText)
if record.name == self.name:
Expand All @@ -1639,6 +1640,7 @@ def request(self, zc: 'Zeroconf', timeout: float) -> bool:
record_types_for_check_cache = [(_TYPE_SRV, _CLASS_IN), (_TYPE_TXT, _CLASS_IN)]
if self.server is not None:
record_types_for_check_cache.append((_TYPE_A, _CLASS_IN))
record_types_for_check_cache.append((_TYPE_AAAA, _CLASS_IN))
for record_type in record_types_for_check_cache:
cached = zc.cache.get_by_details(self.name, *record_type)
if cached:
Expand Down