diff options
author | Bob Halley <halley@dnspython.org> | 2021-12-17 08:19:46 -0800 |
---|---|---|
committer | Bob Halley <halley@dnspython.org> | 2021-12-17 08:19:46 -0800 |
commit | 2d6e4ff11a208c14fad28fc699426b0a2f8be8f9 (patch) | |
tree | aebc9d8887c09ba3372de37aebf8750fab124c8c | |
parent | 8388a8d3cecf3e0077f6f3b82dacdcbe0540ce1a (diff) | |
download | dnspython-2d6e4ff11a208c14fad28fc699426b0a2f8be8f9.tar.gz |
Do not set asyncio future if it is already done. [#740]
-rw-r--r-- | dns/_asyncio_backend.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dns/_asyncio_backend.py b/dns/_asyncio_backend.py index 4c8c054..d737d13 100644 --- a/dns/_asyncio_backend.py +++ b/dns/_asyncio_backend.py @@ -28,7 +28,7 @@ class _DatagramProtocol: self.transport = transport def datagram_received(self, data, addr): - if self.recvfrom: + if self.recvfrom and not self.recvfrom.done(): self.recvfrom.set_result((data, addr)) self.recvfrom = None |