]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
fix timeout computation in async send_tcp()
authorBob Halley <halley@dnspython.org>
Wed, 19 Aug 2020 15:24:11 +0000 (08:24 -0700)
committerBob Halley <halley@dnspython.org>
Wed, 19 Aug 2020 15:24:11 +0000 (08:24 -0700)
dns/asyncquery.py

index b792648067a4f3a1bc36643db6b90c57d1e08651..8a10daebcacf6ffea09f6886634dbb6ddda2e6d3 100644 (file)
@@ -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)