Skip to content
Merged
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
8 changes: 6 additions & 2 deletions zeroconf/_dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,12 @@ def is_recent(self, now: float) -> bool:
def reset_ttl(self, other: 'DNSRecord') -> None:
"""Sets this record's TTL and created time to that of
another record."""
self.created = other.created
self.ttl = other.ttl
self._set_created_ttl(other.created, other.ttl)

def _set_created_ttl(self, created: float, ttl: Union[float, int]) -> None:
"""Set the created and ttl of a record."""
self.created = created
self.ttl = ttl
self._expiration_time = None
self._stale_time = None
self._recent_time = None
Expand Down