We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b60f307 commit 993a82eCopy full SHA for 993a82e
1 file changed
zeroconf/_dns.py
@@ -197,8 +197,12 @@ def is_recent(self, now: float) -> bool:
197
def reset_ttl(self, other: 'DNSRecord') -> None:
198
"""Sets this record's TTL and created time to that of
199
another record."""
200
- self.created = other.created
201
- self.ttl = other.ttl
+ self._set_created_ttl(other.created, other.ttl)
+
202
+ def _set_created_ttl(self, created: float, ttl: Union[float, int]) -> None:
203
+ """Set the created and ttl of a record."""
204
+ self.created = created
205
+ self.ttl = ttl
206
self._expiration_time = None
207
self._stale_time = None
208
self._recent_time = None
0 commit comments