diff --git a/LXMF/LXMF.py b/LXMF/LXMF.py index 9b467f3..6bb5714 100644 --- a/LXMF/LXMF.py +++ b/LXMF/LXMF.py @@ -282,8 +282,12 @@ class LXMessage: if self.representation == LXMessage.PACKET: receipt = self.__as_packet().send() - receipt.set_delivery_callback(self.__mark_delivered) - receipt.set_timeout_callback(self.__link_packet_timed_out) + if receipt: + receipt.set_delivery_callback(self.__mark_delivered) + receipt.set_timeout_callback(self.__link_packet_timed_out) + else: + if self.__delivery_destination: + self.__delivery_destination.teardown() elif self.representation == LXMessage.RESOURCE: self.resource_representation = self.__as_resource() diff --git a/setup.py b/setup.py index cc5de3e..e218750 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("README.md", "r") as fh: setuptools.setup( name="lxmf", - version="0.1.5", + version="0.1.6", author="Mark Qvist", author_email="mark@unsigned.io", description="Lightweight Extensible Message Format for Reticulum",