From b8c6ea015ec2b4801a5f81d47a30f9c84bcdab8b Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 19 Sep 2023 10:13:27 +0200 Subject: [PATCH] Fixed missing attribute check --- RNS/Channel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RNS/Channel.py b/RNS/Channel.py index cf4a1aa..47c11f6 100644 --- a/RNS/Channel.py +++ b/RNS/Channel.py @@ -530,7 +530,7 @@ class Channel(contextlib.AbstractContextManager): def _update_packet_timeouts(self): for envelope in self._tx_ring: updated_timeout = self._get_packet_timeout_time(envelope.tries) - if envelope.packet and envelope.packet.receipt and envelope.packet.receipt.timeout: + if envelope.packet and hasattr(envelope.packet, "receipt") and envelope.packet.receipt and envelope.packet.receipt.timeout: if updated_timeout > envelope.packet.receipt.timeout: envelope.packet.receipt.set_timeout(updated_timeout)