From a9326311ba4e69984c6acc7f7376c16637ec98ca Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Wed, 19 Aug 2020 08:24:11 -0700 Subject: [PATCH] fix timeout computation in async send_tcp() --- dns/asyncquery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/asyncquery.py b/dns/asyncquery.py index b7926480..8a10daeb 100644 --- a/dns/asyncquery.py +++ b/dns/asyncquery.py @@ -294,7 +294,7 @@ async def send_tcp(sock, what, expiration=None): # onto the net tcpmsg = struct.pack("!H", l) + what sent_time = time.time() - await sock.sendall(tcpmsg, expiration) + await sock.sendall(tcpmsg, _timeout(expiration, sent_time)) return (len(tcpmsg), sent_time) -- 2.47.3