summaryrefslogtreecommitdiff
path: root/dns/query.py
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-08-22 19:11:19 -0700
committerBob Halley <halley@dnspython.org>2020-08-22 19:11:19 -0700
commitae2b35b0145ae3b75c9494a984b14ff3851e9532 (patch)
tree6c61cf27a8e0a5ccf888de381e3c9062b66e03ae /dns/query.py
parent030a9f8f87e862c738c858facabf2d0c4d44e440 (diff)
downloaddnspython-ae2b35b0145ae3b75c9494a984b14ff3851e9532.tar.gz
is_udp is better as Inbound attribute not parameter to process_message(). Increase coverage.
Diffstat (limited to 'dns/query.py')
-rw-r--r--dns/query.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/dns/query.py b/dns/query.py
index 37c727e..bd62a7a 100644
--- a/dns/query.py
+++ b/dns/query.py
@@ -1059,7 +1059,8 @@ def inbound_xfr(where, txn_manager, query=None,
else:
tcpmsg = struct.pack("!H", len(wire)) + wire
_net_write(s, tcpmsg, expiration)
- with dns.xfr.Inbound(txn_manager, rdtype, serial) as inbound:
+ with dns.xfr.Inbound(txn_manager, rdtype, serial,
+ is_udp) as inbound:
done = False
tsig_ctx = None
while not done:
@@ -1079,7 +1080,7 @@ def inbound_xfr(where, txn_manager, query=None,
multi=(not is_udp),
one_rr_per_rrset=is_ixfr)
try:
- done = inbound.process_message(r, is_udp)
+ done = inbound.process_message(r)
except dns.xfr.UseTCP:
assert is_udp # should not happen if we used TCP!
if udp_mode == UDPMode.ONLY: