Skip to content

Commit

Permalink
When doing xfr, do not compare with expiration if it is None.
Browse files Browse the repository at this point in the history
[Issue rthalley#390]
  • Loading branch information
rthalley committed Sep 29, 2019
1 parent f1aa70a commit 9403c1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dns/query.py
Expand Up @@ -607,7 +607,8 @@ def xfr(where, zone, rdtype=dns.rdatatype.AXFR, rdclass=dns.rdataclass.IN,
first = True
while not done:
mexpiration = _compute_expiration(timeout)
if mexpiration is None or mexpiration > expiration:
if mexpiration is None or \
(expiration is not None and mexpiration > expiration):
mexpiration = expiration
if use_udp:
_wait_for_readable(s, expiration)
Expand Down

0 comments on commit 9403c1b

Please sign in to comment.