Skip to content

Commit

Permalink
feat: speed up processing incoming records (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Apr 1, 2023
1 parent 489069a commit 7246a34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zeroconf/_handlers.py
Expand Up @@ -489,7 +489,7 @@ def _async_mark_unique_cached_records_older_than_1s_to_expire(
# Since unique is set, all old records with that name, rrtype,
# and rrclass that were received more than one second ago are declared
# invalid, and marked to expire from the cache in one second.
answers_rrset = DNSRRSet(answers)
answers_rrset = set(answers)
for name, type_, class_ in unique_types:
for entry in self.cache.async_all_by_details(name, type_, class_):
if (now - entry.created > _ONE_SECOND) and entry not in answers_rrset:
Expand Down

0 comments on commit 7246a34

Please sign in to comment.