Fixed unhandled behaviour when link interface intermittently becomes unavailable

This commit is contained in:
Mark Qvist 2022-04-27 20:46:26 +02:00
parent bd3ace0885
commit 323241a4b8
2 changed files with 7 additions and 3 deletions

View File

@ -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()

View File

@ -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",